Last active
December 31, 2015 16:49
-
-
Save iissnan/8016602 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
| angular.module("testModule", []) | |
| // syntax: module.directive("namespaceName", factory) | |
| // factory will be invoked once by $compiler to create a directive for the first time match happens | |
| // and invoked via $inject.invoke makes it injectable just like a controller. | |
| .directive("testDirective", function directiveFactory($log) { | |
| var directiveDefinitionObject = {}; | |
| return directiveDefinitionObject; | |
| // or return a constructor function | |
| // Prefer using the definition object over returning a function. | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment