mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
docs(angular.Module): fix controller and directive method parameters
This commit is contained in:
parent
8473b9d558
commit
9a21050b43
3 changed files with 11 additions and 7 deletions
|
|
@ -178,7 +178,8 @@ function setupModuleLoader(window) {
|
|||
* @ngdoc method
|
||||
* @name angular.Module#controller
|
||||
* @methodOf angular.Module
|
||||
* @param {string} name Controller name.
|
||||
* @param {string|Object} name Controller name, or an object map of controllers where the
|
||||
* keys are the names and the values are the constructors.
|
||||
* @param {Function} constructor Controller constructor function.
|
||||
* @description
|
||||
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
|
||||
|
|
@ -189,7 +190,8 @@ function setupModuleLoader(window) {
|
|||
* @ngdoc method
|
||||
* @name angular.Module#directive
|
||||
* @methodOf angular.Module
|
||||
* @param {string} name directive name
|
||||
* @param {string|Object} name Directive name, or an object map of directives where the
|
||||
* keys are the names and the values are the factories.
|
||||
* @param {Function} directiveFactory Factory function for creating new instance of
|
||||
* directives.
|
||||
* @description
|
||||
|
|
|
|||
|
|
@ -168,10 +168,11 @@ function $CompileProvider($provide) {
|
|||
* @description
|
||||
* Register a new directive with the compiler.
|
||||
*
|
||||
* @param {string} name Name of the directive in camel-case. (ie <code>ngBind</code> which will match as
|
||||
* <code>ng-bind</code>).
|
||||
* @param {function|Array} directiveFactory An injectable directive factory function. See {@link guide/directive} for more
|
||||
* info.
|
||||
* @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
|
||||
* will match as <code>ng-bind</code>), or an object map of directives where the keys are the
|
||||
* names and the values are the factories.
|
||||
* @param {function|Array} directiveFactory An injectable directive factory function. See
|
||||
* {@link guide/directive} for more info.
|
||||
* @returns {ng.$compileProvider} Self for chaining.
|
||||
*/
|
||||
this.directive = function registerDirective(name, directiveFactory) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ function $ControllerProvider() {
|
|||
* @ngdoc function
|
||||
* @name ng.$controllerProvider#register
|
||||
* @methodOf ng.$controllerProvider
|
||||
* @param {string} name Controller name
|
||||
* @param {string|Object} name Controller name, or an object map of controllers where the keys are
|
||||
* the names and the values are the constructors.
|
||||
* @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
|
||||
* annotations in the array notation).
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue