Skip to content

Instantly share code, notes, and snippets.

@bholzer
Last active August 29, 2015 13:57
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 bholzer/9826609 to your computer and use it in GitHub Desktop.
Save bholzer/9826609 to your computer and use it in GitHub Desktop.
//Set up modules
(function() {
'use strict';
angular.module('autoMailer', ['ui.router']);
angular.module('autoMailer.providers', []);
angular.module('autoMailer.directives', []);
angular.module('autoMailer.filters', []);
angular.module('autoMailer.controllers', []);
})();
//Define routes in config
$stateProvider
.state('anon', {
abstract: true,
template: "<ui-view/>"
})
.state('anon.login', {
url: '/login',
templateUrl: 'templates/login.html',
controller: 'LoginCtrl'
});
//Controller
(function() {
'use strict';
angular.module('autoMailer.controllers').controller('LoginCtrl', [
'$scope',
function($scope) {
$scope.password = "";
$scope.username = "";
$scope.login = function() {
console.log('Test');
};
}
]);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment