click on frmaework and extensions; and choose instead of domready to No Wrap - in
How to write the Angular js codes in jsfiddle?
Question
I learn the Angularjs these days, then I using the online fiddle.net to write the angular.js codes. At first because the jsfiddle need't write the html tag. so I don't know where I should put the "ng-app" command. The link that I share doesn't work, are you get the same question? http://jsfiddle.net/liminjun88/Jh9K7/
function CartController($scope){
$scope.items=[
{title:'Paint pots',quantity:8,price:3.95},
{title:'Polka dots',quantity:17,price:12.95},
{title:'Pebbles',quantity:5,price:6.95}
];
$scope.remove=function(index){
$scope.items.splice(index,1);
}
}
La solution
Autres conseils
You have it right, you just need to change when your script gets run, from the second dropdown in the upper left.
No wrap - in <head>
You need to use AngularJS with option No wrap - in <body>
Here is the fixed JSFiddle: http://jsfiddle.net/tomepejo/mrX4L/
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow