0

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);
                }
}
1

3 Answers 3

0

click on frmaework and extensions; and choose instead of domready to No Wrap - in enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

You have it right, you just need to change when your script gets run, from the second dropdown in the upper left.

Here's the modified fiddle

No wrap - in <head>

Comments

0

You need to use AngularJS with option No wrap - in <body>

enter image description here

Here is the fixed JSFiddle: http://jsfiddle.net/tomepejo/mrX4L/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.