Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('sleepExpertChatApp', [
- 'ionic',
- ])
- .config(function($stateProvider, $urlRouterProvider) {
- $stateProvider
- .state('peoplelist', {
- url: '/peoplelist',
- templateUrl: 'templates/people-list.html',
- controller: 'PeopleListCtrl'
- });
- $urlRouterProvider.otherwise('/peoplelist');
- })
- .controller('PeopleListCtrl', function($scope){
- $scope.obj = {}
- $scope.test = "Mytestvar"
- $scope.obj.people = [{name:"leon"},{name:"jeff"},{name:"leon"}];
- console.log($scope.obj);
- });
- <!DOCTYPE html>
- <html ng-app="sleepExpertChatApp">
- <head>
- <script src="http://code.ionicframework.com/1.0.0/js/ionic.bundle.js"></script>
- <script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
- <script src="https://cdn.firebase.com/libs/angularfire/1.1.1/angularfire.min.js"></script>
- <script src="/static/chat/main.js"></script>
- <link rel="stylesheet" type="text/css" href="http://code.ionicframework.com/1.0.0/css/ionic.min.css">
- </head>
- <body>
- <ion-nav-view></ion-nav-view>
- <script id="templates/people-list.html" type="text/ng-template">
- <ion-view id="userMessagesView"
- view-title="People">
- afsdf
- <ion-content>
- <div ng-repeat="person in obj.people">
- <div class="item">
- {{person.name}}
- </div>
- </div>
- </ion-content>
- </ion-view>
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement