Created
September 10, 2015 14:54
-
-
Save benjaminW78/c3307972cd6aca7a1154 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
.directive('myDirective', [function () { | |
return { | |
restrict : 'E', | |
replace : true, | |
controller: 'MyController', | |
templateUrl : 'directives/myDirective.tpl.html', | |
link : function (scope, elem, attrs, controller) { | |
scope.message = 'Hello World!'; | |
controller.toto(); | |
} | |
}; | |
}]) | |
.controller('MyController', [function ($scope, $element, $attrs, $log, $timeout) { | |
$scope.toto = function(){ | |
console.log(lololool); | |
} | |
}); | |
}]) |
dhoko
commented
Sep 10, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment