Skip to content

Instantly share code, notes, and snippets.

@adamweeks
Created June 11, 2015 19:00
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 adamweeks/89940a6ad928554eb246 to your computer and use it in GitHub Desktop.
Save adamweeks/89940a6ad928554eb246 to your computer and use it in GitHub Desktop.
Directive Template for use in Webstorm
(function() {
'use strict';
angular
.module('${moduleName}')
.controller('${controllerName}', [${controllerName}])
.directive('${directiveName}', [${directiveName}]);
function ${controllerName}() {
var vm = this;
vm.activate = function() {
};
vm.activate();
}
function ${directiveName}() {
return {
restrict: 'E',
scope: {},
templateUrl: '',
controller: '${controllerName}',
controllerAs: 'vm',
bindToController: true,
};
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment