Skip to content

Instantly share code, notes, and snippets.

@palcisto
Last active October 27, 2017 20:44
Show Gist options
  • Save palcisto/76d705d280059d199f00 to your computer and use it in GitHub Desktop.
Save palcisto/76d705d280059d199f00 to your computer and use it in GitHub Desktop.
Angular Controller Boilerplate
(function() {
'use strict';
angular
.module('', [])
.controller('ControllerName', ControllerName);
ControllerName.$inject = [];
function ControllerName(argument) {
const vm = this;
// ========================================================================
// Public Properties
// ========================================================================
/**
* Directive Bound Properties/Methods
*
* @property {[type]} [propertyName] [description]
*/
vm.helloWorld = 'Hello World';
// ========================================================================
// Public Methods
// ========================================================================
// ========================================================================
// Initializations
// ========================================================================
activate();
// ========================================================================
// Listeners/Watchers
// ========================================================================
// ========================================================================
// Private functions
// ========================================================================
function activate() {
// body...
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment