@angular-wave/angular.ts 0.7.4 → 0.7.7
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/@types/core/scope/scope.d.ts +0 -2
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/shared/utils.d.ts +8 -0
- package/Makefile +1 -1
- package/dist/angular-ts.esm.js +228 -199
- package/dist/angular-ts.umd.js +228 -199
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/assets/scss/index.scss +12 -0
- package/docs/content/_index.md +15 -4
- package/docs/content/docs/_index.md +7 -6
- package/docs/content/docs/directive/bind.md +70 -0
- package/docs/content/docs/directive/blur.md +38 -0
- package/docs/content/docs/directive/channel.md +1 -3
- package/docs/content/docs/directive/class-even.md +3 -3
- package/docs/content/docs/directive/class-odd.md +4 -4
- package/docs/content/docs/directive/class.md +7 -7
- package/docs/content/docs/directive/click.md +41 -0
- package/docs/content/docs/directive/cloak.md +4 -8
- package/docs/content/docs/directive/copy.md +38 -0
- package/docs/content/docs/directive/cut.md +40 -0
- package/docs/content/docs/directive/dblclick.md +41 -0
- package/docs/content/docs/directive/focus.md +38 -0
- package/docs/content/docs/directive/keydown.md +38 -0
- package/docs/content/docs/directive/keyup.md +38 -0
- package/docs/content/docs/directive/load.md +43 -0
- package/docs/content/docs/directive/mousedown.md +38 -0
- package/docs/content/docs/directive/mouseenter.md +38 -0
- package/docs/content/docs/directive/mouseleave.md +38 -0
- package/docs/content/docs/directive/mousemove.md +38 -0
- package/docs/content/docs/directive/mouseout.md +38 -0
- package/docs/content/docs/directive/mouseover.md +38 -0
- package/docs/content/docs/directive/mouseup.md +38 -0
- package/docs/layouts/404.html +1 -1
- package/docs/static/examples/eventbus/eventbus.js +1 -1
- package/docs/static/examples/ng-bind/ng-bind.html +9 -0
- package/docs/static/examples/ng-blur/ng-blur.html +9 -0
- package/docs/static/examples/ng-click/ng-click.html +6 -0
- package/docs/static/examples/ng-copy/ng-copy.html +6 -0
- package/docs/static/examples/ng-cut/ng-cut.html +6 -0
- package/docs/static/examples/ng-dblclick/ng-dblclick.html +10 -0
- package/docs/static/examples/ng-focus/ng-focus.html +9 -0
- package/docs/static/examples/ng-keydown/ng-keydown.html +9 -0
- package/docs/static/examples/ng-keyup/ng-keyup.html +9 -0
- package/docs/static/examples/ng-load/ng-load.html +8 -0
- package/docs/static/examples/ng-mousedown/ng-mousedown.html +6 -0
- package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +4 -0
- package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +4 -0
- package/docs/static/examples/ng-mousemove/ng-mousemove.html +4 -0
- package/docs/static/examples/ng-mouseout/ng-mouseout.html +4 -0
- package/docs/static/examples/ng-mouseover/ng-mouseover.html +4 -0
- package/docs/static/examples/ng-mouseup/ng-mouseup.html +4 -0
- package/legacy.d.ts +0 -4
- package/package.json +1 -1
- package/src/core/location/location.js +1 -1
- package/src/core/scope/scope.js +0 -5
- package/src/directive/bind/bind.js +16 -4
- package/src/directive/bind/bind.spec.js +13 -0
- package/src/directive/events/events.js +21 -24
- package/src/directive/events/events.md +0 -41
- package/src/directive/messages/messages.js +1 -1
- package/src/directive/observe/{test.html → observe-demo.html} +0 -1
- package/src/directive/repeat/repeat.js +175 -153
- package/src/directive/setter/setter.js +1 -1
- package/src/directive/switch/switch.spec.js +1 -1
- package/src/router/directives/state-directives.js +4 -6
- package/src/services/anchor-scroll.js +1 -1
- package/src/shared/utils.js +19 -1
- package/docs/static/examples/ng-class/ng-class.js +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mouseenter
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mouseenter event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mouseenter` directive allows you to specify custom behavior when a mouse
|
|
10
|
+
enters an element.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mouseenter`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mouseenter](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event)
|
|
21
|
+
event.
|
|
22
|
+
[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
|
|
23
|
+
object is available as `$event`.
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div ng-mouseenter="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mouseenter/ng-mouseenter.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mouseenter/ng-mouseenter.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mouseleave
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mouseleave event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mouseleave` directive allows you to specify custom behavior when an
|
|
10
|
+
element a mouse leaves entire element.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mouseleave`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mouseleave](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseleave_event)
|
|
21
|
+
event.
|
|
22
|
+
[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
|
|
23
|
+
object is available as `$event`.
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div ng-mouseleave="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mouseleave/ng-mouseleave.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mouseleave/ng-mouseleave.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mousemove
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mousemove event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mousemove` directive allows you to specify custom custom behavior when a
|
|
10
|
+
mouse is moved over an element.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mousemove`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mousemove](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event)
|
|
21
|
+
event.
|
|
22
|
+
[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
|
|
23
|
+
object is available as `$event`.
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div ng-mousemove="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mousemove/ng-mousemove.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mousemove/ng-mousemove.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mouseout
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mouseout event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mouseout` directive allows you to specify custom behavior when a mouse
|
|
10
|
+
leaves any part of the element or its children.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mouseout`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mouseout](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseout_event)
|
|
21
|
+
event.
|
|
22
|
+
[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
|
|
23
|
+
object is available as `$event`.
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div ng-mouseout="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mouseout/ng-mouseout.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mouseout/ng-mouseout.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mouseover
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mouseover event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mouseover` directive allows you to specify custom behavior when a mouse
|
|
10
|
+
is placed over an element.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mouseover`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mouseover](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseover_event)
|
|
21
|
+
event.
|
|
22
|
+
[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
|
|
23
|
+
object is available as `$event`.
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div ng-mouseover="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mouseover/ng-mouseover.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mouseover/ng-mouseover.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mouseup
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mouseup event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mouseup` directive allows you to specify custom behavior when a pressed
|
|
10
|
+
mouse is released over an element.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mouseup`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mouseup](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event)
|
|
21
|
+
event.
|
|
22
|
+
[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
|
|
23
|
+
object is available as `$event`.
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div ng-mouseup="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mouseup/ng-mouseup.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mouseup/ng-mouseup.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
package/docs/layouts/404.html
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<section ng-app>
|
|
2
|
+
<!-- Eager bind -->
|
|
3
|
+
<label>Enter name: <input type="text" ng-model="name" /></label><br />
|
|
4
|
+
Hello <span ng-bind="name">I am never displayed</span>!
|
|
5
|
+
|
|
6
|
+
<!-- Lazy bind -->
|
|
7
|
+
<button ng-click="name1 = name">Sync</button>
|
|
8
|
+
<span ng-bind="name1" data-lazy="true">I am server content</span>!
|
|
9
|
+
</section>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<section ng-app>
|
|
2
|
+
<img
|
|
3
|
+
ng-load="res = 'Large image loaded'"
|
|
4
|
+
width="150px"
|
|
5
|
+
src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Centroamerica_prehispanica_siglo_XVI.svg/1920px-Centroamerica_prehispanica_siglo_XVI.svg.png"
|
|
6
|
+
/>
|
|
7
|
+
{{ res }}
|
|
8
|
+
</section>
|
package/legacy.d.ts
CHANGED
|
@@ -662,10 +662,6 @@ declare namespace angular {
|
|
|
662
662
|
$eval(expression: string, locals?: Object): any;
|
|
663
663
|
$eval(expression: (scope: IScope) => any, locals?: Object): any;
|
|
664
664
|
|
|
665
|
-
$evalAsync(): void;
|
|
666
|
-
$evalAsync(expression: string, locals?: Object): void;
|
|
667
|
-
$evalAsync(expression: (scope: IScope) => void, locals?: Object): void;
|
|
668
|
-
|
|
669
665
|
// Defaults to false by the implementation checking strategy
|
|
670
666
|
$new(isolate?: boolean, parent?: IScope): IScope;
|
|
671
667
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@angular-wave/angular.ts",
|
|
3
3
|
"description": "A modern, optimized and type-safe version of AngularJS",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.7",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/angular-ts.esm.js",
|
|
8
8
|
"module": "dist/angular-ts.esm.js",
|
package/src/core/scope/scope.js
CHANGED
|
@@ -467,7 +467,6 @@ export class Scope {
|
|
|
467
467
|
$destroy: this.$destroy.bind(this),
|
|
468
468
|
$eval: this.$eval.bind(this),
|
|
469
469
|
$apply: this.$apply.bind(this),
|
|
470
|
-
$evalAsync: this.$evalAsync.bind(this),
|
|
471
470
|
$postUpdate: this.$postUpdate.bind(this),
|
|
472
471
|
$isRoot: this.#isRoot.bind(this),
|
|
473
472
|
$target: target,
|
|
@@ -977,10 +976,6 @@ export class Scope {
|
|
|
977
976
|
return res;
|
|
978
977
|
}
|
|
979
978
|
|
|
980
|
-
async $evalAsync(expr, locals) {
|
|
981
|
-
return await this.$eval(expr, locals);
|
|
982
|
-
}
|
|
983
|
-
|
|
984
979
|
/**
|
|
985
980
|
* @param {Object} newTarget
|
|
986
981
|
*/
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
isUndefined,
|
|
3
|
+
stringify,
|
|
4
|
+
isNull,
|
|
5
|
+
isProxy,
|
|
6
|
+
isDefined,
|
|
7
|
+
} from "../../shared/utils.js";
|
|
2
8
|
import { $injectTokens } from "../../injection-tokens.js";
|
|
3
9
|
|
|
4
10
|
/**
|
|
@@ -12,9 +18,15 @@ export function ngBindDirective() {
|
|
|
12
18
|
* @param {import('../../core/compile/attributes.js').Attributes} attr
|
|
13
19
|
*/
|
|
14
20
|
link(scope, element, attr) {
|
|
15
|
-
scope.$watch(
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
scope.$watch(
|
|
22
|
+
attr["ngBind"],
|
|
23
|
+
(value) => {
|
|
24
|
+
element.textContent = stringify(
|
|
25
|
+
isProxy(value) ? value.$target : value,
|
|
26
|
+
);
|
|
27
|
+
},
|
|
28
|
+
isDefined(attr["lazy"]),
|
|
29
|
+
);
|
|
18
30
|
},
|
|
19
31
|
};
|
|
20
32
|
}
|
|
@@ -106,6 +106,19 @@ describe("ng-bind", () => {
|
|
|
106
106
|
$rootScope.value.$target.toString(),
|
|
107
107
|
);
|
|
108
108
|
});
|
|
109
|
+
|
|
110
|
+
it("should support `data-lazy` attribute", async () => {
|
|
111
|
+
$rootScope.value = 0;
|
|
112
|
+
await wait();
|
|
113
|
+
element = $compile('<div ng-bind="value" data-lazy="true">Content</div>')(
|
|
114
|
+
$rootScope,
|
|
115
|
+
);
|
|
116
|
+
expect(element.textContent).toEqual("Content");
|
|
117
|
+
|
|
118
|
+
$rootScope.value = 2;
|
|
119
|
+
await wait();
|
|
120
|
+
expect(element.textContent).toEqual("2");
|
|
121
|
+
});
|
|
109
122
|
});
|
|
110
123
|
|
|
111
124
|
describe("ngBindTemplate", () => {
|
|
@@ -6,31 +6,28 @@ import { directiveNormalize } from "../../shared/utils.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export const ngEventDirectives = {};
|
|
8
8
|
|
|
9
|
-
"click copy cut dblclick focus blur keydown keyup
|
|
9
|
+
"click copy cut dblclick focus blur keydown keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove"
|
|
10
10
|
.split(" ")
|
|
11
|
-
.forEach(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
];
|
|
32
|
-
},
|
|
33
|
-
);
|
|
11
|
+
.forEach((eventName) => {
|
|
12
|
+
const directiveName = directiveNormalize(`ng-${eventName}`);
|
|
13
|
+
ngEventDirectives[directiveName] = [
|
|
14
|
+
"$parse",
|
|
15
|
+
"$exceptionHandler",
|
|
16
|
+
/**
|
|
17
|
+
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
18
|
+
* @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
($parse, $exceptionHandler) => {
|
|
22
|
+
return createEventDirective(
|
|
23
|
+
$parse,
|
|
24
|
+
$exceptionHandler,
|
|
25
|
+
directiveName,
|
|
26
|
+
eventName,
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
});
|
|
34
31
|
|
|
35
32
|
/**
|
|
36
33
|
*
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
## ngClick
|
|
2
|
-
|
|
3
|
-
**Directive:** `ngClick`
|
|
4
|
-
**Restrict:** `A`
|
|
5
|
-
**Element:** `ANY`
|
|
6
|
-
**Priority:** `0`
|
|
7
|
-
|
|
8
|
-
**Description:**
|
|
9
|
-
The ngClick directive allows you to specify custom behavior when an element is clicked.
|
|
10
|
-
|
|
11
|
-
**Param:**
|
|
12
|
-
|
|
13
|
-
- `{String} ngClick` [Expression](guide/expression) to evaluate upon click. ([Event object](guide/expression#-event-) is available as `$event`).
|
|
14
|
-
|
|
15
|
-
## ngDblclick
|
|
16
|
-
|
|
17
|
-
**Directive:** `ngDblclick`
|
|
18
|
-
**Restrict:** `A`
|
|
19
|
-
**Element:** `ANY`
|
|
20
|
-
**Priority:** `0`
|
|
21
|
-
|
|
22
|
-
**Description:**
|
|
23
|
-
The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.
|
|
24
|
-
|
|
25
|
-
**Param:**
|
|
26
|
-
|
|
27
|
-
- `{string} ngDblclick` [Expression](guide/expression) to evaluate upon a dblclick. (The Event object is available as `$event`).
|
|
28
|
-
|
|
29
|
-
**Example:**
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<example name="ng-dblclick">
|
|
33
|
-
<file name="index.html">
|
|
34
|
-
<button ng-dblclick="count = count + 1" ng-init="count=0">
|
|
35
|
-
Increment (on double click)
|
|
36
|
-
</button>
|
|
37
|
-
count: {{count}}
|
|
38
|
-
</file>
|
|
39
|
-
</example>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
1
|
## ngSubmit
|
|
43
2
|
|
|
44
3
|
**Directive:** `ngSubmit`
|
|
@@ -103,7 +103,7 @@ class NgMessageCtrl {
|
|
|
103
103
|
reRender() {
|
|
104
104
|
if (!this.renderLater) {
|
|
105
105
|
this.renderLater = true;
|
|
106
|
-
|
|
106
|
+
Promise.resolve().then(() => {
|
|
107
107
|
if (this.renderLater && this.cachedCollection) {
|
|
108
108
|
this.render(this.cachedCollection);
|
|
109
109
|
}
|