FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
NativeScript/apps/tests/frame-tests.ts at patch-1 · rclai/NativeScript · GitHub
rclai
NativeScript
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
NativeScript
/
apps
/
tests
/
frame-tests.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
58 lines (54 loc) · 1.63 KB
Breadcrumbs
NativeScript
/
apps
/
tests
/
frame-tests.ts
Copy path
File metadata and controls
58 lines (54 loc) · 1.63 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
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
// <snippet module="ui/frame" title="frame">
// # Frame
// To perform navigation, you will need a reference to the topmost frame of the application.
// ``` JavaScript
import
frameModule
=
require
(
"ui/frame"
)
;
var
topmost
=
frameModule
.
topmost
(
)
;
// ```
// </snippet>
import
labelModule
=
require
(
"ui/label"
)
;
import
pagesModule
=
require
(
"ui/page"
)
;
export
var
test_DummyTestForSnippetOnly0
=
function
(
)
{
// <snippet module="ui/frame" title="frame">
// ### Navigating to a Module
// ``` JavaScript
topmost
.
navigate
(
"details-page"
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly1
=
function
(
)
{
// <snippet module="ui/frame" title="frame">
// ### Navigating with a Factory Function
// ``` JavaScript
var
factoryFunc
=
function
(
)
{
var
label
=
new
labelModule
.
Label
(
)
;
label
.
text
=
"Hello, world!"
;
var
page
=
new
pagesModule
.
Page
(
)
;
page
.
content
=
label
;
return
page
;
}
;
topmost
.
navigate
(
factoryFunc
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly2
=
function
(
)
{
// <snippet module="ui/frame" title="frame">
// ### Navigating with NavigationEntry
// ``` JavaScript
var
navigationEntry
=
{
moduleName
:
"details-page"
,
context
:
{
info
:
"something you want to pass to your page"
}
,
animated
:
false
}
;
topmost
.
navigate
(
navigationEntry
)
;
// ```
// </snippet>
}
export
var
test_DummyTestForSnippetOnly3
=
function
(
)
{
// <snippet module="ui/frame" title="frame">
// ### Navigating Back
// ``` JavaScript
topmost
.
goBack
(
)
;
// ```
// </snippet>
}
Back
|
FazBrowse Home
|
New Git URL