Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. index.html
  2. <html>
  3. <head>
  4. <title>My Angular App</title>
  5. <script src="thing.js"></script>
  6. </head>
  7. <body ng-app="flapperNews" ng-controller="MainCtrl">
  8. <div ng-repeat="post in posts">
  9. {{post}}
  10. </div>
  11. </body>
  12. <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
  13. </html>
  14.  
  15. -------------------------------------------------------------
  16. thing.js
  17. var app = angular.module('flapperNews', []);
  18.  
  19. app.controller('MainCtrl', [
  20. '$scope'
  21. function($scope){
  22. $scope.posts = [
  23. 'post 1',
  24. 'post 2',
  25. 'post 3',
  26. 'post 4',
  27. 'post 5'
  28. ];
  29. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement