Skip to content

Instantly share code, notes, and snippets.

@cawabunga
Last active December 24, 2015 15:56
Show Gist options
  • Save cawabunga/88c429ca0685de07d3ff to your computer and use it in GitHub Desktop.
Save cawabunga/88c429ca0685de07d3ff to your computer and use it in GitHub Desktop.
WebStorm Live Template: Exports Angular Directive
'use strict';
function factory(ng) {
/**
* @ngdoc directive
* @name $NAME$
* @restrict E
* @scope
*/
ng.directive('$NAME$', function descriptor() {
return {
restrict: 'E',
bindToController: true,
scope: {$END$},
template: require('./view.html'),
controller: require('./controller'),
controllerAs: 'vm'
};
});
}
module.exports = factory;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment