Skip to content

Instantly share code, notes, and snippets.

@Vintharas
Last active September 24, 2015 13:20
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 Vintharas/15e38e4eb2b59b738cd3 to your computer and use it in GitHub Desktop.
Save Vintharas/15e38e4eb2b59b738cd3 to your computer and use it in GitHub Desktop.
Angular directive ReSharper Live Template
/*
* $description$ directive.
*
* Usage:
* <vtf-$directiveName$></vtf-$directiveName$>
*
*/
(function () {
'use strict';
angular
.module('$moduleName$')
.directive('vtf$directiveNameCamelCase$', electricalConsumptionDirective);
function electricalConsumptionDirective() {
return {
restrict: 'E', // restrict directive to Elements
templateUrl: '/Content/templates/$templateUrl$.html',
replace: true, // replace directive with HTML elements
controller: $directiveNameUpperCase$Controller,
controllerAs: 'vm',
scope: {} // isolated scope
};
}
$directiveNameUpperCase$Controller.$inject = ['$log'];
function $directiveNameUpperCase$Controller($log) {
var vm = this;
$END$
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment