File tree Expand file tree Collapse file tree 5 files changed +100
-18
lines changed
Expand file tree Collapse file tree 5 files changed +100
-18
lines changed Original file line number Diff line number Diff line change 11---
2- title : ng-channel
2+ title : ng-offline
33description : >
4- Subscribe a template to a messaging service topic
4+ Handler for offline event
55---
66
77### Description
88
9- Updates element’s content by subscribing to events published on a named channel
10- using ` $eventBus ` .
11-
12- - If the element ** does not** contain any child elements or templates, the
13- directive will ** replace the element's inner HTML** with the published value.
14- - If the element ** does** contain a template and the published value is an
15- ** object** , the directive will ** merge the object’s key-value pairs into the
16- current scope** , allowing Angular expressions like to be evaluated and
17- rendered.
18-
19- The directive automatically unsubscribes from the event channel when the scope
20- is destroyed.
9+ The ` ng-offline ` directive allows you to specify custom behavior when pressing
10+ keys, regardless of whether they produce a character value.
2111
2212### Parameters
2313
2414---
2515
26- #### ` ng-channel `
16+ #### ` ng-offline `
17+
18+ - ** Type:** [ Expression] ( ../../../typedoc/types/Expression.html )
19+ - ** Description:** Expression to evaluate upon ` Window `
20+ [ offline] ( https://https://developer.mozilla.org/en-US/docs/Web/API/Window/offline_event )
21+ event. [ Event] ( https://developer.mozilla.org/en-US/docs/Web/API/Event ) object
22+ is available as ` $event ` .
23+ - ** Example:**
2724
28- - ** Type:** ` string `
29- - ** Description:** The name of the channel to subscribe to using ` $eventBus ` .
25+ ``` html
26+ <div ng-offline =" offline = true" >{{ offline }}</div >
27+ ```
28+
29+ ---
3030
3131#### Demo
3232
33- {{< showdemo src="examples/ng-channel/ng-channel.html" >}}
33+ {{< showhtml src="examples/ng-offline/ng-offline.html" >}}
34+
35+ {{< showraw src="examples/ng-offline/ng-offline.html" >}}
3436
3537---
Original file line number Diff line number Diff line change 1+ ---
2+ title : ng-offline
3+ description : >
4+ Handler for offline event
5+ ---
6+
7+ ### Description
8+
9+ The ` ng-offline ` directive allows you to specify custom behavior when pressing
10+ keys, regardless of whether they produce a character value.
11+
12+ ### Parameters
13+
14+ ---
15+
16+ #### ` ng-offline `
17+
18+ - ** Type:** [ Expression] ( ../../../typedoc/types/Expression.html )
19+ - ** Description:** Expression to evaluate upon ` Window `
20+ [ offline] ( https://https://developer.mozilla.org/en-US/docs/Web/API/Window/offline_event )
21+ event. [ Event] ( https://developer.mozilla.org/en-US/docs/Web/API/Event ) object
22+ is available as ` $event ` .
23+ - ** Example:**
24+
25+ ``` html
26+ <div ng-offline =" offline = true" >{{ offline }}</div >
27+ ```
28+
29+ ---
30+
31+ #### Demo
32+
33+ {{< showhtml src="examples/ng-offline/ng-offline.html" >}}
34+
35+ {{< showraw src="examples/ng-offline/ng-offline.html" >}}
36+
37+ ---
Original file line number Diff line number Diff line change 1+ ---
2+ title : ng-online
3+ description : >
4+ Handler for online event
5+ ---
6+
7+ ### Description
8+
9+ The ` ng-online ` directive allows you to specify custom behavior when pressing
10+ keys, regardless of whether they produce a character value.
11+
12+ ### Parameters
13+
14+ ---
15+
16+ #### ` ng-online `
17+
18+ - ** Type:** [ Expression] ( ../../../typedoc/types/Expression.html )
19+ - ** Description:** Expression to evaluate upon ` Window `
20+ [ online] ( https://https://developer.mozilla.org/en-US/docs/Web/API/Window/online_event )
21+ event. [ Event] ( https://developer.mozilla.org/en-US/docs/Web/API/Event ) object
22+ is available as ` $event ` .
23+ - ** Example:**
24+
25+ ``` html
26+ <div ng-online =" online = true" >{{ online }}</div >
27+ ```
28+
29+ ---
30+
31+ #### Demo
32+
33+ {{< showhtml src="examples/ng-online/ng-online.html" >}}
34+
35+ {{< showraw src="examples/ng-online/ng-online.html" >}}
36+
37+ ---
Original file line number Diff line number Diff line change 1+ < section ng-app >
2+ < div ng-offline ="offline = true "> Disconnected: {{ offline }}</ div >
3+ </ section >
Original file line number Diff line number Diff line change 1+ < section ng-app >
2+ < div ng-online ="online = true "> Connected: {{ online }}</ div >
3+ </ section >
You can’t perform that action at this time.
0 commit comments