Skip to content

Instantly share code, notes, and snippets.

@matmkian
Created August 30, 2016 15:30
Show Gist options
  • Save matmkian/ed640e1282e9243e1e254d1e091508bb to your computer and use it in GitHub Desktop.
Save matmkian/ed640e1282e9243e1e254d1e091508bb to your computer and use it in GitHub Desktop.
(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