Created
August 30, 2016 15:30
-
-
Save matmkian/ed640e1282e9243e1e254d1e091508bb to your computer and use it in GitHub Desktop.
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() | |
{ | |
'use strict'; | |
angular | |
.module('Directives') | |
.directive('myDirective', myDirective); | |
/* @ngInject */ | |
function myDirective() | |
{ | |
return { | |
restrict: 'E', | |
templateUrl: '/my/template/path.html', | |
scope: { | |
example: '=' | |
}, | |
link: link, | |
controller: MyController, | |
controllerAs: 'vm', | |
bindToController: true, | |
replace: true, | |
transclude: true | |
}; | |
function link(scope, element, attrs, ctrl) | |
{ | |
// Nothing to do | |
} | |
} | |
/* @ngInject */ | |
function MyController() | |
{ | |
var vm = this; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment