mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-18 11:31:07 +00:00
doc($formFactory): migrated the $formFactory documentation
This commit is contained in:
parent
57c37a21d1
commit
ea18f4548d
1 changed files with 25 additions and 18 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc service
|
* @ngdoc object
|
||||||
* @name angular.service.$formFactory
|
* @name angular.module.NG.$formFactory
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* Use `$formFactory` to create a new instance of a {@link guide/dev_guide.forms form}
|
* Use `$formFactory` to create a new instance of a {@link angular.module.NG.$formFactory.Form Form}
|
||||||
* controller or to find the nearest form instance for a given DOM element.
|
* controller or to find the nearest form instance for a given DOM element.
|
||||||
*
|
*
|
||||||
* The form instance is a collection of widgets, and is responsible for life cycle and validation
|
* The form instance is a collection of widgets, and is responsible for life cycle and validation
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* @param {Form=} parentForm The form which should be the parent form of the new form controller.
|
* @param {Form=} parentForm The form which should be the parent form of the new form controller.
|
||||||
* If none specified default to the `rootForm`.
|
* If none specified default to the `rootForm`.
|
||||||
* @returns {Form} A new <a href="#form">form</a> instance.
|
* @returns {Form} A new {@link angular.module.NG.$formFactory.Form Form} instance.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
|
|
@ -95,6 +95,13 @@
|
||||||
</doc:example>
|
</doc:example>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc object
|
||||||
|
* @name angular.module.NG.$formFactory.Form
|
||||||
|
* @description
|
||||||
|
* The `Form` is a controller which keeps track of the validity of the widgets contained within it.
|
||||||
|
*/
|
||||||
|
|
||||||
function $FormFactoryProvider() {
|
function $FormFactoryProvider() {
|
||||||
var $parse;
|
var $parse;
|
||||||
this.$get = ['$rootScope', '$parse', function($rootScope, $parse_) {
|
this.$get = ['$rootScope', '$parse', function($rootScope, $parse_) {
|
||||||
|
|
@ -102,7 +109,7 @@ function $FormFactoryProvider() {
|
||||||
/**
|
/**
|
||||||
* @ngdoc proprety
|
* @ngdoc proprety
|
||||||
* @name rootForm
|
* @name rootForm
|
||||||
* @propertyOf angular.service.$formFactory
|
* @propertyOf angular.module.NG.$formFactory
|
||||||
* @description
|
* @description
|
||||||
* Static property on `$formFactory`
|
* Static property on `$formFactory`
|
||||||
*
|
*
|
||||||
|
|
@ -115,7 +122,7 @@ function $FormFactoryProvider() {
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name forElement
|
* @name forElement
|
||||||
* @methodOf angular.service.$formFactory
|
* @methodOf angular.module.NG.$formFactory
|
||||||
* @description
|
* @description
|
||||||
* Static method on `$formFactory` service.
|
* Static method on `$formFactory` service.
|
||||||
*
|
*
|
||||||
|
|
@ -142,7 +149,7 @@ function $FormFactoryProvider() {
|
||||||
/**
|
/**
|
||||||
* @ngdoc property
|
* @ngdoc property
|
||||||
* @name $error
|
* @name $error
|
||||||
* @propertyOf angular.service.$formFactory
|
* @propertyOf angular.module.NG.$formFactory.Form
|
||||||
* @description
|
* @description
|
||||||
* Property of the form and widget instance.
|
* Property of the form and widget instance.
|
||||||
*
|
*
|
||||||
|
|
@ -154,7 +161,7 @@ function $FormFactoryProvider() {
|
||||||
/**
|
/**
|
||||||
* @ngdoc property
|
* @ngdoc property
|
||||||
* @name $invalid
|
* @name $invalid
|
||||||
* @propertyOf angular.service.$formFactory
|
* @propertyOf angular.module.NG.$formFactory.Form
|
||||||
* @description
|
* @description
|
||||||
* Property of the form and widget instance.
|
* Property of the form and widget instance.
|
||||||
*
|
*
|
||||||
|
|
@ -164,7 +171,7 @@ function $FormFactoryProvider() {
|
||||||
/**
|
/**
|
||||||
* @ngdoc property
|
* @ngdoc property
|
||||||
* @name $valid
|
* @name $valid
|
||||||
* @propertyOf angular.service.$formFactory
|
* @propertyOf angular.module.NG.$formFactory.Form
|
||||||
* @description
|
* @description
|
||||||
* Property of the form and widget instance.
|
* Property of the form and widget instance.
|
||||||
*
|
*
|
||||||
|
|
@ -173,8 +180,8 @@ function $FormFactoryProvider() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc event
|
* @ngdoc event
|
||||||
* @name angular.service.$formFactory#$valid
|
* @name angular.module.NG.$formFactory.Form#$valid
|
||||||
* @eventOf angular.service.$formFactory
|
* @eventOf angular.module.NG.$formFactory.Form
|
||||||
* @eventType listen on form
|
* @eventType listen on form
|
||||||
* @description
|
* @description
|
||||||
* Upon receiving the `$valid` event from the widget update the `$error`, `$valid` and `$invalid`
|
* Upon receiving the `$valid` event from the widget update the `$error`, `$valid` and `$invalid`
|
||||||
|
|
@ -187,8 +194,8 @@ function $FormFactoryProvider() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc event
|
* @ngdoc event
|
||||||
* @name angular.service.$formFactory#$invalid
|
* @name angular.module.NG.$formFactory.Form#$invalid
|
||||||
* @eventOf angular.service.$formFactory
|
* @eventOf angular.module.NG.$formFactory.Form
|
||||||
* @eventType listen on form
|
* @eventType listen on form
|
||||||
* @description
|
* @description
|
||||||
* Upon receiving the `$invalid` event from the widget update the `$error`, `$valid` and `$invalid`
|
* Upon receiving the `$invalid` event from the widget update the `$error`, `$valid` and `$invalid`
|
||||||
|
|
@ -201,8 +208,8 @@ function $FormFactoryProvider() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc event
|
* @ngdoc event
|
||||||
* @name angular.service.$formFactory#$validate
|
* @name angular.module.NG.$formFactory.Form#$validate
|
||||||
* @eventOf angular.service.$formFactory
|
* @eventOf angular.module.NG.$formFactory.Form
|
||||||
* @eventType emit on widget
|
* @eventType emit on widget
|
||||||
* @description
|
* @description
|
||||||
* Emit the `$validate` event on the widget, giving a widget a chance to emit a
|
* Emit the `$validate` event on the widget, giving a widget a chance to emit a
|
||||||
|
|
@ -212,8 +219,8 @@ function $FormFactoryProvider() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc event
|
* @ngdoc event
|
||||||
* @name angular.service.$formFactory#$viewChange
|
* @name angular.module.NG.$formFactory.Form#$viewChange
|
||||||
* @eventOf angular.service.$formFactory
|
* @eventOf angular.module.NG.$formFactory.Form
|
||||||
* @eventType listen on widget
|
* @eventType listen on widget
|
||||||
* @description
|
* @description
|
||||||
* A widget is responsible for emitting this event whenever the view changes do to user interaction.
|
* A widget is responsible for emitting this event whenever the view changes do to user interaction.
|
||||||
|
|
@ -286,7 +293,7 @@ function $FormFactoryProvider() {
|
||||||
/**
|
/**
|
||||||
* @ngdoc method
|
* @ngdoc method
|
||||||
* @name $createWidget
|
* @name $createWidget
|
||||||
* @methodOf angular.service.$formFactory
|
* @methodOf angular.module.NG.$formFactory.Form
|
||||||
* @description
|
* @description
|
||||||
*
|
*
|
||||||
* Use form's `$createWidget` instance method to create new widgets. The widgets can be created
|
* Use form's `$createWidget` instance method to create new widgets. The widgets can be created
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue