Created
June 8, 2015 03:18
-
-
Save chalkers/accd2c3b6179021efafa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('starter.controllers', []) | |
.controller('DashCtrl', function($scope) {}) | |
.controller('ChatsCtrl', function($scope, Chats) { | |
// With the new view caching in Ionic, Controllers are only called | |
// when they are recreated or on app start, instead of every page change. | |
// To listen for when this page is active (for example, to refresh data), | |
// listen for the $ionicView.enter event: | |
// | |
//$scope.$on('$ionicView.enter', function(e) { | |
//}); | |
$scope.chats = Chats.all(); | |
$scope.remove = function(chat) { | |
Chats.remove(chat); | |
} | |
}) | |
.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) { | |
$scope.chat = Chats.get($stateParams.chatId); | |
}) | |
.controller('AccountCtrl', function($scope) { | |
$scope.settings = { | |
enableFriends: true | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment