$compileProvider.directive()

directive(name, directiveFactory);

Register a new directive with the compiler.

Parameters

Param Type Details
name stringObject

Name of the directive in camel-case (i.e. ngBind which will match as ng-bind), or an object map of directives where the keys are the names and the values are the factories.

directiveFactory function()Array

An injectable directive factory function. See the directive guide and the compile API for more info.

Returns

ng.$compileProvider

Self for chaining.

doc_AngularJS
2016-03-29 16:10:17
Comments
Leave a Comment

Please login to continue.