Skip to content

Instantly share code, notes, and snippets.

@DaniloOliveira28
Created March 10, 2015 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaniloOliveira28/906d63083184fe740989 to your computer and use it in GitHub Desktop.
Save DaniloOliveira28/906d63083184fe740989 to your computer and use it in GitHub Desktop.
controller.js
angular.module('starter.controllers', [])
.controller('DashCtrl', function($scope) {})
.controller('ChatsCtrl', function($scope, Chats) {
$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