Created
September 10, 2015 14:54
-
-
Save benjaminW78/c3307972cd6aca7a1154 to your computer and use it in GitHub Desktop.
Revisions
-
benjaminW78 created this gist
Sep 10, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ .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); } }); }])