@@ -82,37 +82,37 @@ angular.module('starter.controllers', [])
8282. controller ( 'ChatDetailCtrl' , function ( $scope , $stateParams , Chats ) {
8383 var _str = 'ChatDetailCtrl'
8484 $scope . chat = Chats . get ( $stateParams . chatId ) ;
85- /* $scope.$on('$ionicView.loaded', function() {
86- console.log(_str + ' loaded', $scope, $scope.$id)
87- });
88- $scope.$on('$ionicView.beforeEnter', function() {
89- // Anything you can think of
90- console.log(_str + ' BeforeEnter', $scope, $scope.$id)
91- });
92- $scope.$on('$ionicView.enter', function() {
93- console.log(_str + ' enter', $scope, $scope.$id)
94- // Anything you can think of
95- });
96- $scope.$on('$ionicView.afterEnter', function() {
97- console.log(_str + ' afterEnter', $scope, $scope.$id)
98- });
85+ /* $scope.$on('$ionicView.loaded', function() {
86+ console.log(_str + ' loaded', $scope, $scope.$id)
87+ });
88+ $scope.$on('$ionicView.beforeEnter', function() {
89+ // Anything you can think of
90+ console.log(_str + ' BeforeEnter', $scope, $scope.$id)
91+ });
92+ $scope.$on('$ionicView.enter', function() {
93+ console.log(_str + ' enter', $scope, $scope.$id)
94+ // Anything you can think of
95+ });
96+ $scope.$on('$ionicView.afterEnter', function() {
97+ console.log(_str + ' afterEnter', $scope, $scope.$id)
98+ });
9999
100- $scope.$on('$ionicView.beforeLeave', function() {
101- console.log(_str + ' beforeLeave', $scope, $scope.$id)
102- // Anything you can think of
103- });
104- $scope.$on('$ionicView.leave', function() {
105- console.log(_str + ' Leave', $scope, $scope.$id)
106- });
100+ $scope.$on('$ionicView.beforeLeave', function() {
101+ console.log(_str + ' beforeLeave', $scope, $scope.$id)
102+ // Anything you can think of
103+ });
104+ $scope.$on('$ionicView.leave', function() {
105+ console.log(_str + ' Leave', $scope, $scope.$id)
106+ });
107107
108- $scope.$on('$ionicView.afterLeave', function() {
109- console.log(_str + ' afterLeave', $scope, $scope.$id)
108+ $scope.$on('$ionicView.afterLeave', function() {
109+ console.log(_str + ' afterLeave', $scope, $scope.$id)
110110
111- });
112- $scope.$on('$ionicView.unloaded', function() {
113- console.log(_str + 'unloaded', $scope, $scope.$id)
114- // Anything you can think of
115- });*/
111+ });
112+ $scope.$on('$ionicView.unloaded', function() {
113+ console.log(_str + 'unloaded', $scope, $scope.$id)
114+ // Anything you can think of
115+ });*/
116116} )
117117
118118. controller ( 'AccountCtrl' , function ( ) {
@@ -121,4 +121,34 @@ angular.module('starter.controllers', [])
121121 vm . settings = {
122122 enableFriends : true
123123 } ;
124+ var _41 = 41 ;
125+ vm . setName = setName ;
126+ vm . add41 = add41 ;
127+
128+
129+ activate ( )
130+
131+ function setName ( ) {
132+ vm . name = 'pepito' ;
133+ }
134+
135+ function activate ( ) {
136+ var arrayn = [ ] ;
137+ for ( var i = 0 ; i < 40 ; i ++ ) {
138+ var obj = {
139+ name : i ,
140+ }
141+ arrayn . push ( obj )
142+ }
143+
144+ vm . numbers = arrayn ;
145+ }
146+
147+ function add41 ( ) {
148+ var obj = {
149+ name : _41 ,
150+ }
151+ _41 ++ ;
152+ vm . numbers . unshift ( obj )
153+ }
124154} ) ;
0 commit comments