Last active
August 29, 2015 14:09
-
-
Save ondrek/2aacd0690a7bfa58a93b to your computer and use it in GitHub Desktop.
sample of controller boilerplate
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
;(function(){ | |
/** | |
* The recovery controller provides functionality for: | |
* (1) resetting password, | |
* (2) setting a new one | |
* (3) and switching between views | |
*/ | |
'use strict'; | |
//////////////// controller | |
angular.module('webApp').controller('RecoveryCtrl',[ | |
'$location', 'Auth', RecoveryController | |
]); | |
function RecoveryController($http, $location, $q, exception, logger){ | |
var self = this; | |
self.onLostUserId = onLostUserIdForm; | |
self.onResetPassword = resetPasswordUsingToken; | |
self.onLostPassword = onLostPasswordForm; | |
}; | |
//////////////// definitions | |
function onLostUserIdForm(submittedFormContent){ | |
lib.log.info('User has requested User ID'); | |
}; | |
function LostPasswordForm(submittedFormContent){ | |
lib.log.info('User has requested Password'); | |
}; | |
function resetPasswordUsingToken(submittedFormContent) { | |
lib.log.info('User has submitted Password'); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment