authentication.controller.js 667 Bytes
(function(){
	'use strict';

		angular.module('sbAdminApp')
			.controller('LoginCtrl', ['$scope', '$rootScope', '$state','$mdDialog','$log', 'AUTH_EVENTS', 'LoginService', 'toaster', loginCtrl]);

		function loginCtrl($scope, $rootScope, $state, $mdDialog,$log, AUTH_EVENTS, LoginService ,toaster) {
			$scope.data={}
			$scope.create = function() {
				LoginService.createForm().save($scope.data).$promise.then(function(result) {
					if(result != null){
						toaster.success("form successfully created");
						// $state.go('app.awards');
					}
				}, function error(error) {
					if(error){
						toaster.error("Server error");
					}
				});

		}
			
	}

})();