@angular-wave/angular.ts 0.7.3 → 0.7.5
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/.prettierignore +2 -1
- package/@types/core/exception-handler.d.ts +2 -2
- package/@types/core/task-tracker-factory.d.ts +2 -2
- package/@types/directive/channel/channel.d.ts +2 -18
- package/@types/directive/http/http.d.ts +3 -0
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/injection-tokens.d.ts +3 -0
- package/@types/interface.d.ts +11 -0
- package/@types/loader.d.ts +3 -4
- package/@types/router/params/param-factory.d.ts +10 -2
- package/@types/router/params/param.d.ts +22 -3
- package/@types/router/template-factory.d.ts +2 -2
- package/@types/router/url/url-service.d.ts +2 -2
- package/@types/services/http/http.d.ts +2 -2
- package/@types/services/http/interface.d.ts +219 -0
- package/@types/services/http-backend/http-backend.d.ts +26 -19
- package/@types/services/log/interface.d.ts +33 -0
- package/@types/services/log/log.d.ts +25 -0
- package/@types/{core → services}/pubsub/pubsub.d.ts +6 -6
- package/@types/services/template-cache/interface.d.ts +4 -0
- package/@types/services/template-cache/template-cache.d.ts +11 -0
- package/@types/services/template-request.d.ts +1 -1
- package/@types/shared/cache.d.ts +9 -0
- package/@types/shared/dom.d.ts +2 -2
- package/Makefile +2 -2
- package/dist/angular-ts.esm.js +168 -165
- package/dist/angular-ts.umd.js +168 -165
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/assets/scss/_variables_project.scss +1 -1
- package/docs/assets/scss/_variables_project_after_bs.scss +5 -5
- package/docs/assets/scss/index.scss +2 -3
- package/docs/content/_index.md +1 -1
- package/docs/content/docs/_index.md +59 -25
- package/docs/content/docs/directive/_index.md +4 -0
- package/docs/content/docs/directive/app.md +11 -0
- package/docs/content/docs/directive/aria.md +0 -0
- package/docs/content/docs/directive/blur.md +38 -0
- package/docs/content/docs/directive/channel.md +37 -0
- package/docs/content/docs/directive/class-even.md +47 -0
- package/docs/content/docs/directive/class-odd.md +48 -0
- package/docs/content/docs/directive/class.md +64 -0
- package/docs/content/docs/directive/click.md +38 -0
- package/docs/content/docs/directive/cloak.md +74 -0
- 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 +38 -0
- package/docs/content/docs/directive/focus.md +38 -0
- package/docs/content/docs/directive/include.md +7 -0
- package/docs/content/docs/directive/keydown.md +0 -0
- package/docs/content/docs/directive/keyup.md +0 -0
- package/docs/content/docs/directive/load.md +0 -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/content/docs/filter/_index.md +4 -0
- package/docs/content/docs/provider/_index.md +4 -0
- package/docs/content/docs/provider/eventBusProvider.md +35 -0
- package/docs/content/docs/provider/logProvider.md +59 -0
- package/docs/content/docs/provider/templateCacheProvider.md +35 -0
- package/docs/content/docs/service/_index.md +4 -0
- package/docs/content/docs/service/eventBus.md +56 -0
- package/docs/content/docs/service/log.md +113 -0
- package/docs/content/docs/service/templateCache.md +64 -0
- package/docs/hugo.yaml +3 -3
- package/docs/layouts/404.html +1 -1
- package/docs/layouts/partials/hooks/head-end.html +3 -0
- package/docs/layouts/shortcodes/showhtml.html +2 -0
- package/docs/layouts/shortcodes/showjs.html +2 -0
- package/docs/layouts/shortcodes/showraw.html +1 -0
- package/docs/static/examples/counter/counter-test.html +17 -0
- package/docs/static/examples/counter/counter.html +5 -0
- package/docs/static/examples/counter/counter.test.js +28 -0
- package/docs/static/examples/eventbus/eventbus-test.html +19 -0
- package/docs/static/examples/eventbus/eventbus.html +13 -0
- package/docs/static/examples/eventbus/eventbus.js +15 -0
- package/docs/static/examples/eventbus/eventbus.test.js +19 -0
- package/docs/static/examples/ng-blur/ng-blur.html +9 -0
- package/docs/static/examples/ng-channel/ng-channel-test.html +17 -0
- package/docs/static/examples/ng-channel/ng-channel.html +24 -0
- package/docs/static/examples/ng-channel/ng-channel.test.js +31 -0
- package/docs/static/examples/ng-class/ng-class.html +71 -0
- package/docs/static/examples/ng-class-even/ng-class-even.html +8 -0
- package/docs/static/examples/ng-class-odd/ng-class-odd.html +8 -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-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/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/LogProvider.html +6 -0
- package/docs/static/typedoc/classes/PubSub.html +71 -0
- package/docs/static/typedoc/classes/PubSubProvider.html +3 -0
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +5 -0
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +1 -1
- package/docs/static/typedoc/interfaces/ComponentOptions.html +1 -1
- package/docs/static/typedoc/interfaces/Controller.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +1 -1
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
- package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +1 -0
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +31 -0
- package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +6 -0
- package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +1 -0
- package/docs/static/typedoc/interfaces/HttpResponse.html +8 -0
- package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +1 -0
- package/docs/static/typedoc/interfaces/HttpService.html +38 -0
- package/docs/static/typedoc/interfaces/LogService.html +12 -0
- package/docs/static/typedoc/interfaces/NgModelController.html +1 -1
- package/docs/static/typedoc/interfaces/NgModelOptions.html +1 -1
- package/docs/static/typedoc/interfaces/Provider.html +1 -1
- package/docs/static/typedoc/interfaces/RequestConfig.html +48 -0
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +38 -0
- package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +1 -1
- package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
- package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
- package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
- package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveController.html +1 -1
- package/docs/static/typedoc/types/DirectiveFactory.html +1 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
- package/docs/static/typedoc/types/ExpandoStore.html +2 -0
- package/docs/static/typedoc/types/Expression.html +1 -1
- package/docs/static/typedoc/types/FilterFactory.html +1 -1
- package/docs/static/typedoc/types/FilterFn.html +1 -1
- package/docs/static/typedoc/types/HttpPromise.html +1 -0
- package/docs/static/typedoc/types/Injectable.html +1 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -1
- package/docs/static/typedoc/types/LogCall.html +2 -0
- package/docs/static/typedoc/types/LogServiceFactory.html +2 -0
- package/docs/static/typedoc/types/OnChangesObject.html +1 -1
- package/docs/static/typedoc/types/SwapInsertPosition.html +1 -1
- package/docs/static/typedoc/types/TController.html +1 -1
- package/docs/static/typedoc/types/TemplateCache.html +2 -0
- package/docs/static/typedoc/variables/EventBus.html +1 -0
- package/index.html +4 -2
- package/package.json +3 -3
- package/src/animations/animate-css.js +5 -1
- package/src/binding.spec.js +3 -1
- package/src/core/compile/compile.spec.js +12 -5
- package/src/core/core.html +0 -1
- package/src/core/exception-handler.js +1 -1
- package/src/core/prop.spec.js +1 -0
- package/src/core/task-tracker-factory.js +2 -2
- package/src/directive/bind/bind.spec.js +1 -4
- package/src/directive/channel/channel.js +8 -24
- package/src/directive/channel/channel.spec.js +4 -2
- package/src/directive/class/class.js +16 -0
- package/src/directive/class/class.spec.js +2 -0
- package/src/directive/events/event.spec.js +1 -0
- package/src/directive/events/events.js +21 -24
- package/src/directive/form/form.spec.js +2 -0
- package/src/directive/http/http.js +4 -4
- package/src/directive/if/if.spec.js +2 -0
- package/src/directive/include/include.spec.js +1 -0
- package/src/directive/input/input.spec.js +1 -0
- package/src/directive/model/model.spec.js +3 -0
- package/src/directive/model-options/model-options.spec.js +2 -0
- package/src/directive/observe/{test.html → observe-demo.html} +0 -1
- package/src/directive/observe/observe.spec.js +2 -1
- package/src/{core/pubsub/pubsub.html → directive/on/on.html} +1 -1
- package/src/{core → directive/on}/on.spec.js +5 -3
- package/src/directive/on/on.test.js +11 -0
- package/src/directive/options/options.spec.js +1 -0
- package/src/directive/script/script.js +1 -1
- package/src/directive/select/select.spec.js +1 -0
- package/src/directive/setter/setter.js +1 -1
- package/src/directive/setter/setter.spec.js +2 -0
- package/src/directive/switch/switch.spec.js +1 -0
- package/src/injection-tokens.js +3 -0
- package/src/interface.ts +10 -0
- package/src/loader.js +3 -6
- package/src/public.js +3 -3
- package/src/router/directives/state-directives.spec.js +3 -1
- package/src/router/params/param-factory.js +6 -0
- package/src/router/params/param.js +22 -7
- package/src/router/router.html +0 -1
- package/src/router/router.test.js +2 -1
- package/src/router/services.spec.js +2 -0
- package/src/router/state/state-builder.js +3 -0
- package/src/router/state/state-builder.spec.js +2 -0
- package/src/router/state/state-service.js +1 -1
- package/src/router/state-filter.spec.js +2 -0
- package/src/router/template-factory.html +19 -0
- package/src/router/template-factory.js +3 -3
- package/src/router/template-factory.spec.js +1 -0
- package/src/router/template-factory.test.js +12 -0
- package/src/router/transition/transition-hook.js +1 -1
- package/src/router/url/url-service.js +1 -1
- package/src/router/view-scroll.spec.js +3 -1
- package/src/services/http/http.js +4 -4
- package/src/services/http/http.test.js +1 -1
- package/src/services/http/interface.ts +243 -0
- package/src/services/http-backend/http-backend.js +21 -11
- package/src/services/log/interface.ts +39 -0
- package/src/services/log/log.html +19 -0
- package/src/services/log/log.js +74 -0
- package/src/services/log/log.spec.js +64 -0
- package/src/services/log/log.test.js +11 -0
- package/src/services/pubsub/pubsub.html +19 -0
- package/src/{core → services}/pubsub/pubsub.js +6 -5
- package/src/{core → services}/pubsub/pubsub.spec.js +3 -3
- package/src/{core → services}/pubsub/pubsub.test.js +1 -1
- package/src/services/template-cache/interface.ts +4 -0
- package/src/services/template-cache/template-cache.html +22 -0
- package/src/services/template-cache/template-cache.js +13 -0
- package/src/services/template-cache/template-cache.spec.js +62 -0
- package/src/services/template-cache/template-cache.test.js +11 -0
- package/src/services/template-request.js +2 -2
- package/src/shared/cache.js +9 -0
- package/src/shared/dom.js +13 -7
- package/utils/express.js +7 -9
- package/@types/core/cache/cache-factory.d.ts +0 -22
- package/@types/core/cache/cache.d.ts +0 -28
- package/@types/services/log.d.ts +0 -53
- package/src/core/cache/cache-factory.js +0 -19
- package/src/core/cache/cache.js +0 -27
- package/src/directive/class/class.md +0 -90
- package/src/directive/cloak/cloak.md +0 -24
- package/src/examples/counter.html +0 -20
- package/src/services/log.js +0 -95
- package/src/services/log.md +0 -39
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ng-mousedown
|
|
3
|
+
description: >
|
|
4
|
+
Handler for mousedown event
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
The `ng-mousedown` directive allows you to specify custom behavior when a mouse
|
|
10
|
+
is pressed over an element.
|
|
11
|
+
|
|
12
|
+
### Directive parameters
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### `ng-mousedown`
|
|
17
|
+
|
|
18
|
+
- **Type:** [Expression](../../../typedoc/types/Expression.html)
|
|
19
|
+
- **Description:** Expression to evaluate upon
|
|
20
|
+
[mousedown](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_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-mousedown="$ctrl.greet($event)"></div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
#### Demo
|
|
33
|
+
|
|
34
|
+
{{< showhtml src="examples/ng-mousedown/ng-mousedown.html" >}}
|
|
35
|
+
|
|
36
|
+
{{< showraw src="examples/ng-mousedown/ng-mousedown.html" >}}
|
|
37
|
+
|
|
38
|
+
---
|
|
@@ -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
|
+
---
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: $eventBusProvider
|
|
3
|
+
description: >
|
|
4
|
+
Configuration provider for `$eventBus` service.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
Instance of [PubSubProvider](../../../typedoc/classes/PubSubProvider.html) for
|
|
10
|
+
configuring the `$eventBus` service. The default implementation returns the
|
|
11
|
+
global `angular.EventBus` instance, which is an async instance of
|
|
12
|
+
[PubSub](../../../typedoc/classes/PubSub.html) class.
|
|
13
|
+
|
|
14
|
+
### Properties
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
#### $eventBusProvider.eventBus
|
|
19
|
+
|
|
20
|
+
Customize event bus instance.
|
|
21
|
+
|
|
22
|
+
- **Type:** [PubSub](../../../typedoc/classes/PubSub.html)
|
|
23
|
+
- **Default:** `angular.EventBus`
|
|
24
|
+
|
|
25
|
+
- **Example:**
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
angular.module('demo', []).config(($eventBusProvider) => {
|
|
29
|
+
eventBusProvider.eventBus = new MyCustomPubsub();
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
For service description, see [$eventBus](../../../docs/service/eventbus).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: $logProvider
|
|
3
|
+
description: >
|
|
4
|
+
Configuration provider for `$log` service.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
Instance of [LogProvider](../../../typedoc/classes/LogProvider.html) for
|
|
10
|
+
configuring how the application logs messages.
|
|
11
|
+
|
|
12
|
+
### Properties
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
#### $logProvider.debug
|
|
17
|
+
|
|
18
|
+
Enable or disable debug-level logging. Also see
|
|
19
|
+
[debug property](../../../typedoc/classes/LogProvider.html#debug).
|
|
20
|
+
|
|
21
|
+
- **Type:** boolean
|
|
22
|
+
- **Default:** `false`
|
|
23
|
+
- **Example:**
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
angular.module('demo', []).config(($logProvider) => {
|
|
27
|
+
$logProvider.debug = true;
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Methods
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
#### $logProvider.setLogger()
|
|
36
|
+
|
|
37
|
+
Override the default logger with a custom implementation of the
|
|
38
|
+
[LogService](../../../typedoc/interfaces/LogService.html) interface.
|
|
39
|
+
|
|
40
|
+
- **Parameter:**
|
|
41
|
+
[LogServiceFactory](../../../typedoc/types/LogServiceFactory.html)
|
|
42
|
+
|
|
43
|
+
- **Example:**
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
angular.module('demo', []).config(($logProvider) => {
|
|
47
|
+
$logProvider.setLogger(() => ({
|
|
48
|
+
log: () => {},
|
|
49
|
+
info: () => {},
|
|
50
|
+
warn: () => {},
|
|
51
|
+
error: () => {},
|
|
52
|
+
debug: () => {},
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
For service description, see [$log](../../../docs/service/log).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: $templateCacheProvider
|
|
3
|
+
description: >
|
|
4
|
+
Cache provider for `$templateCache` service.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
Initializes cache instancce for `$templateCache` service as an empty
|
|
10
|
+
[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)
|
|
11
|
+
object.
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
#### $templateCacheProvider.cache
|
|
18
|
+
|
|
19
|
+
Customize cache instance.
|
|
20
|
+
|
|
21
|
+
- **Type:** [TemplateCache](../../../typedoc/types/TemplateCache.html)
|
|
22
|
+
- **Default:** `Map`
|
|
23
|
+
|
|
24
|
+
- **Example:**
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
angular.module('demo', []).config(($templateCacheProvider) => {
|
|
28
|
+
templateCacheProvider.cache.set('test.html', 'hello');
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
For service description, see
|
|
35
|
+
[$templateCache](../../../docs/service/templatecache).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: $eventBus
|
|
3
|
+
description: >
|
|
4
|
+
Pubsub messaging service
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
A messaging service, backed by an instance of
|
|
10
|
+
[PubSub](../../../typedoc/classes/PubSub.html). This implementation is based on
|
|
11
|
+
the original
|
|
12
|
+
[Google Closure PubSub](https://google.github.io/closure-library/api/goog.pubsub.PubSub.html)
|
|
13
|
+
but uses
|
|
14
|
+
[`Promise.resolve()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve)
|
|
15
|
+
instead of
|
|
16
|
+
[`Window.setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout)
|
|
17
|
+
for its async implementation. `$eventBus` allows communication between an
|
|
18
|
+
Angular application instance and the outside context, which can be a different
|
|
19
|
+
module, a non-Angular application, a third-party party library, or even a WASM
|
|
20
|
+
application. Additionally, `$eventBus` can be used to communicate directly with
|
|
21
|
+
a template, using [`ng-channel`](../../../docs/directive/channel) directive.
|
|
22
|
+
|
|
23
|
+
`$eventBus` should not be used for communicating between Angular's own
|
|
24
|
+
primitives.
|
|
25
|
+
|
|
26
|
+
- **For sharing application state**: use custom Services and Factories that
|
|
27
|
+
encapsulate your business logic and manage your model.
|
|
28
|
+
- **For intercomponent communication**: use `$scope.$on()`, `$scope.$emit()`,
|
|
29
|
+
and `$scope.$broadcast()` methods.
|
|
30
|
+
|
|
31
|
+
The example below demonstrates communication between the global `window` context
|
|
32
|
+
and a controller. **Note**: Ensure topic clean-up after the `$scope` is
|
|
33
|
+
destroyed
|
|
34
|
+
|
|
35
|
+
#### Example
|
|
36
|
+
|
|
37
|
+
{{< showhtml src="examples/eventbus/eventbus.html" >}}
|
|
38
|
+
|
|
39
|
+
{{< showjs src="examples/eventbus/eventbus.js" >}}
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
#### Demo
|
|
44
|
+
|
|
45
|
+
{{< showraw src="examples/eventbus/eventbus.html" >}}
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
{{< showraw src="examples/eventbus/eventbus.js" >}}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
For detailed method description, see
|
|
54
|
+
[PubSub](../../../typedoc/classes/PubSub.html)
|
|
55
|
+
|
|
56
|
+
---
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: $log
|
|
3
|
+
description: >
|
|
4
|
+
A simple service for logging
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Using `$log`
|
|
8
|
+
|
|
9
|
+
Default implementation of
|
|
10
|
+
[LogService](../../../typedoc/interfaces/LogService.html) safely writes the
|
|
11
|
+
message into the browser's
|
|
12
|
+
[console](https://developer.mozilla.org/en-US/docs/Web/API/console) (if
|
|
13
|
+
present). The main purpose of this service is to simplify debugging and
|
|
14
|
+
troubleshooting, while allowing the developer to modify the defaults for live
|
|
15
|
+
environments.
|
|
16
|
+
|
|
17
|
+
##### **Example\***
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
angular.module('demo').controller('MyController', ($log) => {
|
|
21
|
+
$log.log('log');
|
|
22
|
+
$log.info('info');
|
|
23
|
+
$log.warn('warn!');
|
|
24
|
+
$log.error('error');
|
|
25
|
+
$log.debug('debug');
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
To reveal the location of the calls to `$log` in the JavaScript console, you can
|
|
30
|
+
"blackbox" the AngularTS source in your browser:
|
|
31
|
+
|
|
32
|
+
- [Mozilla description of blackboxing](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Black_box_a_source).
|
|
33
|
+
- [Chrome description of blackboxing](https://developer.chrome.com/devtools/docs/blackboxing).
|
|
34
|
+
|
|
35
|
+
> Note: Not all browsers support blackboxing.
|
|
36
|
+
> The default is to log `debug` messages. You can use
|
|
37
|
+
> [`$logProvider.debug`](../../../docs/provider/logprovider/#logprovidersetlogger)
|
|
38
|
+
> to change this.
|
|
39
|
+
|
|
40
|
+
For configuration and custom implementations, see
|
|
41
|
+
[$logProvider](../../../docs/provider/logprovider).
|
|
42
|
+
|
|
43
|
+
### Decorating `$log`
|
|
44
|
+
|
|
45
|
+
You can also optionally override any of the `$log` service methods with
|
|
46
|
+
`$provide` decorator. Below is a simple example that overrides default
|
|
47
|
+
`$log.error` to log errors to both console and a backend endpoint.
|
|
48
|
+
|
|
49
|
+
##### **Example\***
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
angular.module('demo').config(($provide) => {
|
|
53
|
+
$provide.decorator('$log', ($delegate, $http, $exceptionHandler) => {
|
|
54
|
+
const originalError = $delegate.error;
|
|
55
|
+
$delegate.error = () => {
|
|
56
|
+
originalError.apply($delegate, arguments);
|
|
57
|
+
const errorMessage = Array.prototype.slice.call(arguments).join(' ');
|
|
58
|
+
$http.post('/api/log/error', { message: errorMessage });
|
|
59
|
+
};
|
|
60
|
+
return $delegate;
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Overriding `console`
|
|
66
|
+
|
|
67
|
+
If your application is already heavily reliant on default
|
|
68
|
+
[console](https://developer.mozilla.org/en-US/docs/Web/API/console) logging or
|
|
69
|
+
you are using a third-party library where logging cannot be overriden, you can
|
|
70
|
+
still take advantage of Angular's services by modifying the globals at runtime.
|
|
71
|
+
Below is an example that overrides default `console.error` to logs errors to
|
|
72
|
+
both console and a backend endpoint.
|
|
73
|
+
|
|
74
|
+
##### **Example\***
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
angular.module('demo').run(($http) => {
|
|
78
|
+
/**
|
|
79
|
+
* Decorate console.error to log error messages to the server.
|
|
80
|
+
*/
|
|
81
|
+
const $delegate = window.console.error;
|
|
82
|
+
window.console.error = (...args) => {
|
|
83
|
+
try {
|
|
84
|
+
const errorMessage = args
|
|
85
|
+
.map((arg) => (arg instanceof Error ? arg.stack : JSON.stringify(arg)))
|
|
86
|
+
.join(' ');
|
|
87
|
+
$delegate.apply(console, args);
|
|
88
|
+
$http.post('/api/log/error', { message: errorMessage });
|
|
89
|
+
} catch (e) {
|
|
90
|
+
console.warn(e);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Detect errors thrown outside Angular and report them to the server.
|
|
96
|
+
*/
|
|
97
|
+
window.addEventListener('error', (e) => {
|
|
98
|
+
window.console.error(e.error || e.message, e);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Optionally: Capture unhandled promise rejections
|
|
103
|
+
*/
|
|
104
|
+
window.addEventListener('unhandledrejection', (e) => {
|
|
105
|
+
window.console.error(e.reason || e);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Combining both `$log` decoration and `console.log` overriding provides a robust
|
|
111
|
+
and flexible error reporting strategy that can adapt to your use-case.
|
|
112
|
+
|
|
113
|
+
\* array notation and HTTP error handling omitted for brevity
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: $templateCache
|
|
3
|
+
description: >
|
|
4
|
+
Map object for storing templates
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
`$templateCache` is a
|
|
8
|
+
[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)
|
|
9
|
+
object created by `$templateCacheProvider`.
|
|
10
|
+
|
|
11
|
+
The first time a template is used, it is loaded in the template cache for quick
|
|
12
|
+
retrieval. You can load templates directly into the cache in a script tag, by
|
|
13
|
+
using $templateRequest, or by consuming the $templateCache service directly.
|
|
14
|
+
|
|
15
|
+
Adding via the script tag:
|
|
16
|
+
|
|
17
|
+
#### Example
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<script type="text/ng-template" id="templateId.html">
|
|
21
|
+
<p>This is the content of the template</p>
|
|
22
|
+
</script>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Note: the script tag containing the template does not need to be included in the
|
|
26
|
+
head of the document, but it must be a descendent of the $rootElement (e.g.
|
|
27
|
+
element with `ng-app` attribute), otherwise the template will be ignored.
|
|
28
|
+
|
|
29
|
+
Adding via the `$templateCache` service:
|
|
30
|
+
|
|
31
|
+
#### Example
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
const myApp = angular.module('myApp', []).run(($templateCache) => {
|
|
35
|
+
$templateCache.set('templateId.html', 'This is the content of the template');
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To retrieve the template, simply use it in your component:
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
myApp.component('myComponent', {
|
|
43
|
+
templateUrl: 'templateId.html',
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
or include it with `ng-include`:
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<div ng-include="'templateId.html`"></div>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
or get it via the `$templateCache` service:
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
myApp.controller(
|
|
57
|
+
'Test',
|
|
58
|
+
class {
|
|
59
|
+
constructor($templateCache) {
|
|
60
|
+
const tmp = $templateCache.get('templateId.html');
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
);
|
|
64
|
+
```
|
package/docs/hugo.yaml
CHANGED
|
@@ -33,7 +33,7 @@ permalinks:
|
|
|
33
33
|
imaging:
|
|
34
34
|
resampleFilter: CatmullRom
|
|
35
35
|
quality: 75
|
|
36
|
-
anchor:
|
|
36
|
+
anchor: Smart
|
|
37
37
|
|
|
38
38
|
markup:
|
|
39
39
|
goldmark:
|
|
@@ -115,7 +115,7 @@ params:
|
|
|
115
115
|
# from_year: 2018
|
|
116
116
|
|
|
117
117
|
customCSS:
|
|
118
|
-
-
|
|
118
|
+
- 'css/index.css'
|
|
119
119
|
|
|
120
120
|
# User interface configuration
|
|
121
121
|
ui:
|
|
@@ -197,4 +197,4 @@ menu:
|
|
|
197
197
|
main:
|
|
198
198
|
- name: 'API'
|
|
199
199
|
url: '/typedoc/index.html'
|
|
200
|
-
weight:
|
|
200
|
+
weight: 50
|
package/docs/layouts/404.html
CHANGED