@angular-wave/angular.ts 0.0.38 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +8 -5
- package/README.md +1 -1
- package/dist/angular-ts.esm.js +2 -1
- package/dist/angular-ts.umd.js +2 -1
- package/package.json +2 -4
- package/rollup.config.js +11 -2
- package/src/angular.spec.js +25 -26
- package/src/animations/animate-css-driver.js +3 -3
- package/src/animations/animate-queue.js +7 -7
- package/src/animations/animation.js +2 -2
- package/src/animations/shared.js +6 -6
- package/src/binding.spec.js +7 -7
- package/src/core/animate/animate.js +5 -5
- package/src/core/animate/animate.spec.js +31 -31
- package/src/core/cache/cache-factory.html +18 -0
- package/src/core/cache/{cache-factor.test.js → cache-factory.test.js} +1 -1
- package/src/core/compile/compile.js +31 -25
- package/src/core/compile/compile.md +2 -2
- package/src/core/cookie-reader.spec.js +2 -2
- package/src/core/core.html +22 -0
- package/src/core/core.test.js +12 -0
- package/src/core/document.spec.js +4 -4
- package/src/core/exception-handler.js +30 -23
- package/src/core/interpolate/interpolate.js +7 -0
- package/src/core/{cache/cache-factor.html → location/location.html} +1 -1
- package/src/core/location/location.js +2 -2
- package/src/core/location/location.spec.js +17 -17
- package/src/core/location/location.test.js +12 -0
- package/src/core/on.spec.js +3 -3
- package/src/core/parser/parse.html +18 -0
- package/src/core/parser/parse.spec.js +1 -1
- package/src/core/parser/parse.test.js +12 -0
- package/src/core/prop.spec.js +3 -4
- package/src/core/pubsub/pubsub.html +18 -0
- package/src/core/pubsub/pubsub.spec.js +1 -1
- package/src/core/pubsub/pubsub.test.js +12 -0
- package/src/core/q/q.html +18 -0
- package/src/core/q/q.js +33 -0
- package/src/core/q/q.test.js +0 -0
- package/src/core/root-element.spec.js +4 -4
- package/src/core/sanitize/sanitize-uri.spec.js +1 -1
- package/src/core/sanitize/sanitize-uri.test.js +12 -0
- package/src/core/sanitize/sanitize.html +21 -0
- package/src/core/sce/sce.html +18 -0
- package/src/core/sce/sce.spec.js +2 -1
- package/src/core/sce/sce.test.js +12 -0
- package/src/core/scope/scope.html +18 -0
- package/src/core/scope/scope.js +5 -8
- package/src/core/scope/scope.spec.js +1 -1
- package/src/core/scope/scope.test.js +12 -0
- package/src/core/task-tracker-factory.js +9 -11
- package/src/core/timeout/timeout.html +18 -0
- package/src/core/timeout/timeout.js +9 -0
- package/src/core/timeout/timeout.spec.js +2 -2
- package/src/core/timeout/timout.test.js +12 -0
- package/src/core/url-utils/url-utils.html +18 -0
- package/src/core/url-utils/url-utils.spec.js +4 -2
- package/src/core/url-utils/url-utils.test.js +12 -0
- package/src/directive/attrs/attrs.spec.js +1 -2
- package/src/directive/attrs/boolean.spec.js +1 -2
- package/src/directive/attrs/element-style.spec.js +6 -7
- package/src/directive/attrs/src.spec.js +1 -2
- package/src/directive/bind/bind.spec.js +1 -2
- package/src/directive/class/class.spec.js +15 -16
- package/src/directive/cloak/cloak.spec.js +3 -4
- package/src/directive/controller/controller.spec.js +4 -5
- package/src/directive/events/click.spec.js +1 -2
- package/src/directive/events/event.spec.js +1 -1
- package/src/directive/events/events.js +7 -0
- package/src/directive/form/form.spec.js +17 -17
- package/src/directive/if/if.spec.js +2 -2
- package/src/directive/include/include.js +2 -2
- package/src/directive/include/include.spec.js +32 -32
- package/src/directive/init/init.spec.js +2 -3
- package/src/directive/input/input.spec.js +3 -3
- package/src/directive/list/list.spec.js +1 -2
- package/src/directive/model/model.js +13 -0
- package/src/directive/model/model.spec.js +4 -5
- package/src/directive/model-options/model-options.spec.js +3 -3
- package/src/directive/non-bindable/non-bindable.spec.js +1 -2
- package/src/directive/options/options.js +5 -5
- package/src/directive/options/options.spec.js +13 -13
- package/src/directive/ref/href.spec.js +1 -2
- package/src/directive/repeat/repeat.spec.js +12 -12
- package/src/directive/script/script.spec.js +2 -3
- package/src/directive/select/select.js +6 -6
- package/src/directive/select/select.spec.js +5 -5
- package/src/directive/show-hide/show-hide.spec.js +12 -13
- package/src/directive/style/style.spec.js +3 -4
- package/src/directive/switch/switch.spec.js +2 -3
- package/src/directive/validators/validators.spec.js +1 -1
- package/src/exts/aria/aria.spec.js +1 -2
- package/src/exts/messages/messages.spec.js +5 -5
- package/src/filters/filter.spec.js +5 -5
- package/src/filters/filters.html +21 -0
- package/src/filters/filters.spec.js +3 -3
- package/src/filters/filters.test.js +12 -0
- package/src/filters/limit-to.md +1 -1
- package/src/filters/limit-to.spec.js +4 -4
- package/src/filters/order-by.spec.js +2 -2
- package/src/index.js +462 -1
- package/src/loader.js +62 -17
- package/src/public.js +6 -2
- package/src/router/directives/state-directives.spec.js +90 -90
- package/src/router/directives/view-directive.js +2 -2
- package/src/router/directives/view-directive.spec.js +9 -9
- package/src/router/state/state.spec.js +2 -4
- package/src/router/template-factory.spec.js +2 -2
- package/src/router/transition/hook-registry.js +2 -2
- package/src/router/view/view.spec.js +1 -1
- package/src/services/browser.js +56 -39
- package/src/services/document.js +16 -13
- package/src/services/log.js +39 -43
- package/src/services/template-request.js +9 -0
- package/src/shared/common.js +0 -3
- package/src/shared/jqlite/jqlite.js +83 -89
- package/src/shared/jqlite/jqlite.spec.js +218 -222
- package/src/shared/strings.js +2 -2
- package/src/shared/test-utils.js +2 -2
- package/src/shared/utils.js +8 -11
- package/src/src.test.js +10 -0
- package/tsconfig.json +1 -1
- package/tsconfig.types.json +11 -0
- package/types/animations/animate-cache.d.ts +7 -7
- package/types/animations/animate-children-directive.d.ts +3 -6
- package/types/animations/animate-swap.d.ts +7 -16
- package/types/animations/animation.d.ts +2 -11
- package/types/animations/raf-scheduler.d.ts +3 -3
- package/types/animations/shared.d.ts +9 -24
- package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
- package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
- package/types/core/compile/compile.d.ts +173 -0
- package/types/core/controller/controller.d.ts +32 -0
- package/types/core/exception-handler.d.ts +9 -42
- package/types/core/filter/filter.d.ts +9 -0
- package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
- package/types/core/interval/interval-factory.d.ts +4 -0
- package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
- package/types/core/location/location.d.ts +209 -0
- package/types/core/pubsub/pubsub.d.ts +156 -0
- package/types/core/q/q.d.ts +65 -0
- package/types/core/sanitize/sanitize-uri.d.ts +53 -0
- package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
- package/types/core/scope/scope.d.ts +727 -0
- package/types/core/task-tracker-factory.d.ts +45 -38
- package/types/core/timeout/timeout.d.ts +29 -0
- package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
- package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
- package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
- package/types/directive/controller/controller.d.ts +6 -0
- package/types/directive/events/events.d.ts +5 -0
- package/types/directive/form/form.d.ts +200 -0
- package/types/directive/if/if.d.ts +8 -0
- package/types/directive/include/include.d.ts +14 -0
- package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
- package/types/directive/{model.d.ts → model/model.d.ts} +281 -280
- package/types/directive/options/options.d.ts +9 -0
- package/types/directive/ref/ref.d.ts +5 -0
- package/types/directive/repeat/repeat.d.ts +8 -0
- package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
- package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
- package/types/directive/switch/switch.d.ts +17 -0
- package/types/directive/transclude/transclude.d.ts +4 -0
- package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
- package/types/filters/filters.d.ts +10 -16
- package/types/filters/order-by.d.ts +2 -4
- package/types/index.d.ts +702 -0
- package/types/injector.d.ts +12 -0
- package/types/public.d.ts +5 -0
- package/types/router/common/coreservices.d.ts +2 -2
- package/types/router/common/glob.d.ts +9 -9
- package/types/router/common/queue.d.ts +13 -13
- package/types/router/common/trace.d.ts +43 -43
- package/types/router/directives/view-directive.d.ts +13 -32
- package/types/router/globals.d.ts +20 -20
- package/types/router/hooks/lazy-load.d.ts +2 -11
- package/types/router/hooks/redirect-to.d.ts +1 -4
- package/types/router/hooks/url.d.ts +1 -5
- package/types/router/hooks/views.d.ts +1 -4
- package/types/router/params/param-factory.d.ts +5 -5
- package/types/router/params/param-type.d.ts +35 -35
- package/types/router/params/param-types.d.ts +11 -11
- package/types/router/params/param.d.ts +38 -38
- package/types/router/params/state-params.d.ts +10 -10
- package/types/router/path/path-node.d.ts +34 -34
- package/types/router/path/path-utils.d.ts +73 -77
- package/types/router/resolve/resolvable.d.ts +32 -32
- package/types/router/resolve/resolve-context.d.ts +84 -84
- package/types/router/services.d.ts +4 -9
- package/types/router/state/state-builder.d.ts +27 -27
- package/types/router/state/state-matcher.d.ts +5 -5
- package/types/router/state/state-object.d.ts +58 -58
- package/types/router/state/state-queue-manager.d.ts +10 -16
- package/types/router/state/state-registry.d.ts +100 -107
- package/types/router/state/state-service.d.ts +411 -411
- package/types/router/state/target-state.d.ts +64 -69
- package/types/router/state/views.d.ts +31 -37
- package/types/router/state-filters.d.ts +7 -7
- package/types/router/state-provider.d.ts +105 -105
- package/types/router/template-factory.d.ts +83 -112
- package/types/router/transition/hook-builder.d.ts +25 -25
- package/types/router/transition/hook-registry.d.ts +68 -83
- package/types/router/transition/interface.d.ts +7 -7
- package/types/router/transition/reject-factory.d.ts +34 -34
- package/types/router/transition/transition-event-type.d.ts +9 -18
- package/types/router/transition/transition-hook.d.ts +77 -82
- package/types/router/transition/transition-service.d.ts +82 -99
- package/types/router/transition/transition.d.ts +369 -377
- package/types/router/url/url-config.d.ts +84 -84
- package/types/router/url/url-matcher.d.ts +115 -119
- package/types/router/url/url-rule.d.ts +114 -124
- package/types/router/url/url-rules.d.ts +217 -217
- package/types/router/url/url-service.d.ts +264 -269
- package/types/router/view/view.d.ts +114 -117
- package/types/router/view-scroll.d.ts +2 -2
- package/types/services/anchor-scroll.d.ts +2 -8
- package/types/services/browser.d.ts +157 -135
- package/types/services/cache-factory.d.ts +25 -25
- package/types/services/cookie-reader.d.ts +2 -2
- package/types/services/document.d.ts +13 -9
- package/types/services/http/http.d.ts +145 -0
- package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
- package/types/services/log.d.ts +55 -52
- package/types/services/template-request.d.ts +44 -53
- package/types/shared/common.d.ts +4 -20
- package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
- package/types/shared/hof.d.ts +1 -1
- package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +16 -17
- package/types/shared/test-utils.d.ts +11 -0
- package/types/shared/utils.d.ts +29 -46
- package/types-back/global.d.ts +3 -1
- package/types-back/index.d.ts +3 -296
- package/types/core/compile.d.ts +0 -206
- package/types/core/controller.d.ts +0 -42
- package/types/core/filter.d.ts +0 -9
- package/types/core/interval-factory.d.ts +0 -21
- package/types/core/location.d.ts +0 -234
- package/types/core/pubsub.d.ts +0 -164
- package/types/core/q.d.ts +0 -33
- package/types/core/root-scope.d.ts +0 -754
- package/types/core/sanitize-uri.d.ts +0 -57
- package/types/core/timeout.d.ts +0 -31
- package/types/directive/controller.d.ts +0 -6
- package/types/directive/events.d.ts +0 -12
- package/types/directive/form.d.ts +0 -230
- package/types/directive/if.d.ts +0 -17
- package/types/directive/include.d.ts +0 -33
- package/types/directive/options.d.ts +0 -16
- package/types/directive/ref.d.ts +0 -11
- package/types/directive/repeat.d.ts +0 -23
- package/types/directive/switch.d.ts +0 -23
- package/types/directive/transclude.d.ts +0 -15
- package/types/services/http.d.ts +0 -157
- /package/src/core/cache/{cache-factor.spec.js → cache-factory.spec.js} +0 -0
- /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
- /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
- /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
- /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
- /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
- /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
- /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
- /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
- /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
|
@@ -1,147 +1,151 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {*} $scope
|
|
4
|
+
* @param {import('../../core/exception-handler').angular.ErrorHandler} $exceptionHandler
|
|
5
|
+
* @param {*} $attr
|
|
6
|
+
* @param {*} $element
|
|
7
|
+
* @param {*} $parse
|
|
8
|
+
* @param {*} $animate
|
|
9
|
+
* @param {*} $timeout
|
|
10
|
+
* @param {*} $q
|
|
11
|
+
* @param {*} $interpolate
|
|
12
|
+
*/
|
|
13
|
+
export function NgModelController($scope: any, $exceptionHandler: import("../../core/exception-handler").angular.ErrorHandler, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any): void;
|
|
12
14
|
export class NgModelController {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
$
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param {*} $scope
|
|
18
|
+
* @param {import('../../core/exception-handler').angular.ErrorHandler} $exceptionHandler
|
|
19
|
+
* @param {*} $attr
|
|
20
|
+
* @param {*} $element
|
|
21
|
+
* @param {*} $parse
|
|
22
|
+
* @param {*} $animate
|
|
23
|
+
* @param {*} $timeout
|
|
24
|
+
* @param {*} $q
|
|
25
|
+
* @param {*} $interpolate
|
|
26
|
+
*/
|
|
27
|
+
constructor($scope: any, $exceptionHandler: import("../../core/exception-handler").angular.ErrorHandler, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any);
|
|
28
|
+
$viewValue: number;
|
|
29
|
+
$modelValue: number;
|
|
30
|
+
$$rawModelValue: any;
|
|
31
|
+
$validators: {};
|
|
32
|
+
$asyncValidators: {};
|
|
33
|
+
$parsers: any[];
|
|
34
|
+
$formatters: any[];
|
|
35
|
+
$viewChangeListeners: any[];
|
|
36
|
+
$untouched: boolean;
|
|
37
|
+
$touched: boolean;
|
|
38
|
+
$pristine: boolean;
|
|
39
|
+
$dirty: boolean;
|
|
40
|
+
$valid: boolean;
|
|
41
|
+
$invalid: boolean;
|
|
42
|
+
$error: {};
|
|
43
|
+
$$success: {};
|
|
44
|
+
$pending: any;
|
|
45
|
+
$name: any;
|
|
46
|
+
$$parentForm: {
|
|
47
|
+
$addControl: () => void;
|
|
48
|
+
$getControls: () => any;
|
|
49
|
+
$$renameControl: (control: any, name: any) => void;
|
|
50
|
+
$removeControl: () => void;
|
|
51
|
+
$setValidity: () => void;
|
|
52
|
+
$setDirty: () => void;
|
|
53
|
+
$setPristine: () => void;
|
|
54
|
+
$setSubmitted: () => void;
|
|
55
|
+
$$setSubmitted: () => void;
|
|
56
|
+
};
|
|
57
|
+
$options: any;
|
|
58
|
+
$$updateEvents: string;
|
|
59
|
+
$$updateEventHandler: any;
|
|
60
|
+
$$parsedNgModel: any;
|
|
61
|
+
$$parsedNgModelAssign: any;
|
|
62
|
+
$$ngModelGet: any;
|
|
63
|
+
$$ngModelSet: any;
|
|
64
|
+
$$pendingDebounce: any;
|
|
65
|
+
$$parserValid: boolean;
|
|
66
|
+
$$parserName: string;
|
|
67
|
+
$$currentValidationRunId: number;
|
|
68
|
+
$$scope: any;
|
|
69
|
+
$$rootScope: any;
|
|
70
|
+
$$attr: any;
|
|
71
|
+
$$element: any;
|
|
72
|
+
$$animate: any;
|
|
73
|
+
$$timeout: any;
|
|
74
|
+
$$parse: any;
|
|
75
|
+
$$q: any;
|
|
76
|
+
$$exceptionHandler: import("../../core/exception-handler").angular.ErrorHandler;
|
|
77
|
+
$$initGetterSetters(): void;
|
|
78
|
+
$render: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* @ngdoc method
|
|
81
|
+
* @name ngModel.NgModelController#$isEmpty
|
|
82
|
+
*
|
|
83
|
+
* @description
|
|
84
|
+
* This is called when we need to determine if the value of an input is empty.
|
|
85
|
+
*
|
|
86
|
+
* For instance, the required directive does this to work out if the input has data or not.
|
|
87
|
+
*
|
|
88
|
+
* The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
|
|
89
|
+
*
|
|
90
|
+
* You can override this for input directives whose concept of being empty is different from the
|
|
91
|
+
* default. The `checkboxInputType` directive does this because in its case a value of `false`
|
|
92
|
+
* implies empty.
|
|
93
|
+
*
|
|
94
|
+
* @param {*} value The value of the input to check for emptiness.
|
|
95
|
+
* @returns {boolean} True if `value` is "empty".
|
|
96
|
+
*/
|
|
97
|
+
$isEmpty(value: any): boolean;
|
|
98
|
+
$$updateEmptyClasses(value: any): void;
|
|
99
|
+
/**
|
|
100
|
+
* @ngdoc method
|
|
101
|
+
* @name ngModel.NgModelController#$setPristine
|
|
102
|
+
*
|
|
103
|
+
* @description
|
|
104
|
+
* Sets the control to its pristine state.
|
|
105
|
+
*
|
|
106
|
+
* This method can be called to remove the `ng-dirty` class and set the control to its pristine
|
|
107
|
+
* state (`ng-pristine` class). A model is considered to be pristine when the control
|
|
108
|
+
* has not been changed from when first compiled.
|
|
109
|
+
*/
|
|
110
|
+
$setPristine(): void;
|
|
111
|
+
/**
|
|
112
|
+
* @ngdoc method
|
|
113
|
+
* @name ngModel.NgModelController#$setDirty
|
|
114
|
+
*
|
|
115
|
+
* @description
|
|
116
|
+
* Sets the control to its dirty state.
|
|
117
|
+
*
|
|
118
|
+
* This method can be called to remove the `ng-pristine` class and set the control to its dirty
|
|
119
|
+
* state (`ng-dirty` class). A model is considered to be dirty when the control has been changed
|
|
120
|
+
* from when first compiled.
|
|
121
|
+
*/
|
|
122
|
+
$setDirty(): void;
|
|
123
|
+
/**
|
|
124
|
+
* @ngdoc method
|
|
125
|
+
* @name ngModel.NgModelController#$setUntouched
|
|
126
|
+
*
|
|
127
|
+
* @description
|
|
128
|
+
* Sets the control to its untouched state.
|
|
129
|
+
*
|
|
130
|
+
* This method can be called to remove the `ng-touched` class and set the control to its
|
|
131
|
+
* untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched
|
|
132
|
+
* by default, however this function can be used to restore that state if the model has
|
|
133
|
+
* already been touched by the user.
|
|
134
|
+
*/
|
|
135
|
+
$setUntouched(): void;
|
|
136
|
+
/**
|
|
137
|
+
* @ngdoc method
|
|
138
|
+
* @name ngModel.NgModelController#$setTouched
|
|
139
|
+
*
|
|
140
|
+
* @description
|
|
141
|
+
* Sets the control to its touched state.
|
|
142
|
+
*
|
|
143
|
+
* This method can be called to remove the `ng-untouched` class and set the control to its
|
|
144
|
+
* touched state (`ng-touched` class). A model is considered to be touched when the user has
|
|
145
|
+
* first focused the control element and then shifted focus away from the control (blur event).
|
|
146
|
+
*/
|
|
147
|
+
$setTouched(): void;
|
|
148
|
+
/**
|
|
145
149
|
* @ngdoc method
|
|
146
150
|
* @name ngModel.NgModelController#$rollbackViewValue
|
|
147
151
|
*
|
|
@@ -230,120 +234,120 @@ export class NgModelController {
|
|
|
230
234
|
</file>
|
|
231
235
|
* </example>
|
|
232
236
|
*/
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
237
|
+
$rollbackViewValue(): void;
|
|
238
|
+
/**
|
|
239
|
+
* @ngdoc method
|
|
240
|
+
* @name ngModel.NgModelController#$validate
|
|
241
|
+
*
|
|
242
|
+
* @description
|
|
243
|
+
* Runs each of the registered validators (first synchronous validators and then
|
|
244
|
+
* asynchronous validators).
|
|
245
|
+
* If the validity changes to invalid, the model will be set to `undefined`,
|
|
246
|
+
* unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.
|
|
247
|
+
* If the validity changes to valid, it will set the model to the last available valid
|
|
248
|
+
* `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
|
|
249
|
+
*/
|
|
250
|
+
$validate(): void;
|
|
251
|
+
$$runValidators(modelValue: any, viewValue: any, doneCallback: any): void;
|
|
252
|
+
/**
|
|
253
|
+
* @ngdoc method
|
|
254
|
+
* @name ngModel.NgModelController#$commitViewValue
|
|
255
|
+
*
|
|
256
|
+
* @description
|
|
257
|
+
* Commit a pending update to the `$modelValue`.
|
|
258
|
+
*
|
|
259
|
+
* Updates may be pending by a debounced event or because the input is waiting for a some future
|
|
260
|
+
* event defined in `ng-model-options`. this method is rarely needed as `NgModelController`
|
|
261
|
+
* usually handles calling this in response to input events.
|
|
262
|
+
*/
|
|
263
|
+
$commitViewValue(): void;
|
|
264
|
+
$$lastCommittedViewValue: any;
|
|
265
|
+
$$parseAndValidate(): void;
|
|
266
|
+
$$writeModelToScope(): void;
|
|
267
|
+
/**
|
|
268
|
+
* @ngdoc method
|
|
269
|
+
* @name ngModel.NgModelController#$setViewValue
|
|
270
|
+
*
|
|
271
|
+
* @description
|
|
272
|
+
* Update the view value.
|
|
273
|
+
*
|
|
274
|
+
* This method should be called when a control wants to change the view value; typically,
|
|
275
|
+
* this is done from within a DOM event handler. For example, the {@link ng.directive:input input}
|
|
276
|
+
* directive calls it when the value of the input changes and {@link ng.directive:select select}
|
|
277
|
+
* calls it when an option is selected.
|
|
278
|
+
*
|
|
279
|
+
* When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`
|
|
280
|
+
* and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
|
|
281
|
+
* value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and
|
|
282
|
+
* `$asyncValidators` are called and the value is applied to `$modelValue`.
|
|
283
|
+
* Finally, the value is set to the **expression** specified in the `ng-model` attribute and
|
|
284
|
+
* all the registered change listeners, in the `$viewChangeListeners` list are called.
|
|
285
|
+
*
|
|
286
|
+
* In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`
|
|
287
|
+
* and the `default` trigger is not listed, all those actions will remain pending until one of the
|
|
288
|
+
* `updateOn` events is triggered on the DOM element.
|
|
289
|
+
* All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}
|
|
290
|
+
* directive is used with a custom debounce for this particular event.
|
|
291
|
+
* Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`
|
|
292
|
+
* is specified, once the timer runs out.
|
|
293
|
+
*
|
|
294
|
+
* When used with standard inputs, the view value will always be a string (which is in some cases
|
|
295
|
+
* parsed into another type, such as a `Date` object for `input[date]`.)
|
|
296
|
+
* However, custom controls might also pass objects to this method. In this case, we should make
|
|
297
|
+
* a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not
|
|
298
|
+
* perform a deep watch of objects, it only looks for a change of identity. If you only change
|
|
299
|
+
* the property of the object then ngModel will not realize that the object has changed and
|
|
300
|
+
* will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
|
|
301
|
+
* not change properties of the copy once it has been passed to `$setViewValue`.
|
|
302
|
+
* Otherwise you may cause the model value on the scope to change incorrectly.
|
|
303
|
+
*
|
|
304
|
+
* <div class="alert alert-info">
|
|
305
|
+
* In any case, the value passed to the method should always reflect the current value
|
|
306
|
+
* of the control. For example, if you are calling `$setViewValue` for an input element,
|
|
307
|
+
* you should pass the input DOM value. Otherwise, the control and the scope model become
|
|
308
|
+
* out of sync. It's also important to note that `$setViewValue` does not call `$render` or change
|
|
309
|
+
* the control's DOM value in any way. If we want to change the control's DOM value
|
|
310
|
+
* programmatically, we should update the `ngModel` scope expression. Its new value will be
|
|
311
|
+
* picked up by the model controller, which will run it through the `$formatters`, `$render` it
|
|
312
|
+
* to update the DOM, and finally call `$validate` on it.
|
|
313
|
+
* </div>
|
|
314
|
+
*
|
|
315
|
+
* @param {*} value value from the view.
|
|
316
|
+
* @param {string} trigger Event that triggered the update.
|
|
317
|
+
*/
|
|
318
|
+
$setViewValue(value: any, trigger: string): void;
|
|
319
|
+
$$debounceViewValueCommit(trigger: any): void;
|
|
320
|
+
/**
|
|
321
|
+
* @ngdoc method
|
|
322
|
+
*
|
|
323
|
+
* @name ngModel.NgModelController#$overrideModelOptions
|
|
324
|
+
*
|
|
325
|
+
* @description
|
|
326
|
+
*
|
|
327
|
+
* Override the current model options settings programmatically.
|
|
328
|
+
*
|
|
329
|
+
* The previous `ModelOptions` value will not be modified. Instead, a
|
|
330
|
+
* new `ModelOptions` object will inherit from the previous one overriding
|
|
331
|
+
* or inheriting settings that are defined in the given parameter.
|
|
332
|
+
*
|
|
333
|
+
* See {@link ngModelOptions} for information about what options can be specified
|
|
334
|
+
* and how model option inheritance works.
|
|
335
|
+
*
|
|
336
|
+
* <div class="alert alert-warning">
|
|
337
|
+
* **Note:** this function only affects the options set on the `ngModelController`,
|
|
338
|
+
* and not the options on the {@link ngModelOptions} directive from which they might have been
|
|
339
|
+
* obtained initially.
|
|
340
|
+
* </div>
|
|
341
|
+
*
|
|
342
|
+
* <div class="alert alert-danger">
|
|
343
|
+
* **Note:** it is not possible to override the `getterSetter` option.
|
|
344
|
+
* </div>
|
|
345
|
+
*
|
|
346
|
+
* @param {Object} options a hash of settings to override the previous options
|
|
347
|
+
*
|
|
348
|
+
*/
|
|
349
|
+
$overrideModelOptions(options: any): void;
|
|
350
|
+
/**
|
|
347
351
|
* @ngdoc method
|
|
348
352
|
*
|
|
349
353
|
* @name ngModel.NgModelController#$processModelValue
|
|
@@ -454,21 +458,21 @@ export class NgModelController {
|
|
|
454
458
|
* </example>
|
|
455
459
|
*
|
|
456
460
|
*/
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
461
|
+
$processModelValue(): void;
|
|
462
|
+
/**
|
|
463
|
+
* This method is called internally to run the $formatters on the $modelValue
|
|
464
|
+
*/
|
|
465
|
+
$$format(): number;
|
|
466
|
+
/**
|
|
467
|
+
* This method is called internally when the bound scope value changes.
|
|
468
|
+
*/
|
|
469
|
+
$$setModelValue(modelValue: any): void;
|
|
470
|
+
$$setUpdateOnEvents(): void;
|
|
467
471
|
}
|
|
468
472
|
export namespace NgModelController {
|
|
469
|
-
|
|
473
|
+
let $inject: string[];
|
|
470
474
|
}
|
|
471
|
-
export const ngModelMinErr: (...
|
|
475
|
+
export const ngModelMinErr: (arg0: string, arg1: string, ...arg2: any[]) => Error;
|
|
472
476
|
/**
|
|
473
477
|
* @ngdoc directive
|
|
474
478
|
* @name ngModel
|
|
@@ -657,16 +661,13 @@ export const ngModelMinErr: (...args: any[]) => Error;
|
|
|
657
661
|
</file>
|
|
658
662
|
* </example>
|
|
659
663
|
*/
|
|
660
|
-
export const ngModelDirective: (
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
priority: number;
|
|
667
|
-
compile: (element: any) => {
|
|
664
|
+
export const ngModelDirective: (string | (($rootScope: any) => {
|
|
665
|
+
restrict: string;
|
|
666
|
+
require: string[];
|
|
667
|
+
controller: typeof NgModelController;
|
|
668
|
+
priority: number;
|
|
669
|
+
compile: (element: any) => {
|
|
668
670
|
pre: (scope: any, element: any, attr: any, ctrls: any) => void;
|
|
669
671
|
post: (scope: any, element: any, attr: any, ctrls: any) => void;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
)[];
|
|
672
|
+
};
|
|
673
|
+
}))[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const ngOptionsDirective: (string | (($compile: any, $document: any, $parse: any) => {
|
|
2
|
+
restrict: string;
|
|
3
|
+
terminal: boolean;
|
|
4
|
+
require: string[];
|
|
5
|
+
link: {
|
|
6
|
+
pre: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
|
|
7
|
+
post: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
|
|
8
|
+
};
|
|
9
|
+
}))[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const ngRepeatDirective: (string | (($parse: any, $animate: any) => {
|
|
2
|
+
restrict: string;
|
|
3
|
+
multiElement: boolean;
|
|
4
|
+
transclude: string;
|
|
5
|
+
priority: number;
|
|
6
|
+
terminal: boolean;
|
|
7
|
+
compile: ($element: any, $attr: any) => ($scope: any, $element: any, $attr: any, ctrl: any, $transclude: any) => void;
|
|
8
|
+
}))[];
|
|
@@ -13,11 +13,8 @@
|
|
|
13
13
|
* @param {string} type Must be set to `'text/ng-template'`.
|
|
14
14
|
* @param {string} id Cache name of the template.
|
|
15
15
|
*/
|
|
16
|
-
export const scriptDirective: (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
compile(element: any, attr: any): void;
|
|
22
|
-
})
|
|
23
|
-
)[];
|
|
16
|
+
export const scriptDirective: (string | (($templateCache: any) => {
|
|
17
|
+
restrict: string;
|
|
18
|
+
terminal: boolean;
|
|
19
|
+
compile(element: any, attr: any): void;
|
|
20
|
+
}))[];
|