Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'use strict';
angular.module('app')
.directive('my-input', [
function() {
return {
restrict: 'E',
templateUrl: '/my-input.html',
scope: {},
controllerAs: 'myInput',
controller: [
'$scope',
function($scope) {
var self = this;
self.init = function() {
};
}
],
bindToController: true,
require: ['myInput'],
link: function(scope, iElement, iAttrs, controllers) {
var myInput = controllers[0];
myInput.init();
}
};
}
])
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment