-1
<html>
<body ng-app="testApp" ng-controller="testControl">    
    <ul>
       <li ng-repeat="x in phones">
           {{x.name}}<br />{{x.title}}
       </li>    
    </ul>
 </body>   
</html>

JS File

var testApp = angular.module('testApp', []);

testApp.controller('testControl', function($scope){
    $scope.phones = [
        {name: 'iPhone 6', title: 'Apple created'},
        {name: 'Samsumg Galaxy 2', title: 'Samsung created'}
    ];
});

JS Fiddle

http://jsfiddle.net/Lxk5p905/

1

1 Answer 1

3

Fiddle options => No wrap in <head>

JSFiddle Link - no code changed

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

3 Comments

Can you please explain this? I added the <script src=""></script> part in my <head> tags in my application. But it still doesn't show up.
This is why I prefer Plunker for Angular
This just means your script is loaded between your head tags. See more info from the jsfiddle docs. doc.jsfiddle.net/basic/introduction.html#fiddle-options. You're code is working fine, so as @adam0101 mentioned, provide a plunkr if you are having more trouble and we'll take a look with you

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.