Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. angular.module('sleepExpertChatApp', [
  2. 'ionic',
  3. ])
  4.  
  5. .config(function($stateProvider, $urlRouterProvider) {
  6. $stateProvider
  7. .state('peoplelist', {
  8. url: '/peoplelist',
  9. templateUrl: 'templates/people-list.html',
  10. controller: 'PeopleListCtrl'
  11. });
  12.  
  13. $urlRouterProvider.otherwise('/peoplelist');
  14. })
  15.  
  16. .controller('PeopleListCtrl', function($scope){
  17. $scope.obj = {}
  18. $scope.test = "Mytestvar"
  19. $scope.obj.people = [{name:"leon"},{name:"jeff"},{name:"leon"}];
  20. console.log($scope.obj);
  21. });
  22.  
  23. <!DOCTYPE html>
  24. <html ng-app="sleepExpertChatApp">
  25. <head>
  26. <script src="http://code.ionicframework.com/1.0.0/js/ionic.bundle.js"></script>
  27. <script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
  28. <script src="https://cdn.firebase.com/libs/angularfire/1.1.1/angularfire.min.js"></script>
  29. <script src="/static/chat/main.js"></script>
  30. <link rel="stylesheet" type="text/css" href="http://code.ionicframework.com/1.0.0/css/ionic.min.css">
  31. </head>
  32. <body>
  33. <ion-nav-view></ion-nav-view>
  34. <script id="templates/people-list.html" type="text/ng-template">
  35. <ion-view id="userMessagesView"
  36. view-title="People">
  37. afsdf
  38. <ion-content>
  39. <div ng-repeat="person in obj.people">
  40. <div class="item">
  41. {{person.name}}
  42. </div>
  43. </div>
  44. </ion-content>
  45. </ion-view>
  46. </script>
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement