Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index.html
- <html>
- <head>
- <title>My Angular App</title>
- <script src="thing.js"></script>
- </head>
- <body ng-app="flapperNews" ng-controller="MainCtrl">
- <div ng-repeat="post in posts">
- {{post}}
- </div>
- </body>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
- </html>
- -------------------------------------------------------------
- thing.js
- var app = angular.module('flapperNews', []);
- app.controller('MainCtrl', [
- '$scope'
- function($scope){
- $scope.posts = [
- 'post 1',
- 'post 2',
- 'post 3',
- 'post 4',
- 'post 5'
- ];
- }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement