Skip to content

Commit 0b48ce2

Browse files
PieterHartzerrigor789
authored andcommitted
Update frame.md (#239)
* Update frame.md Added example for adding external component/page as a default for a frame - Vue equivalent of defaultPage property * Update frame.md * Update frame.md
1 parent ea6d7bb commit 0b48ce2

File tree

1 file changed

+21
-1
lines changed
  • content/docs/en/elements/components

1 file changed

+21
-1
lines changed

content/docs/en/elements/components/frame.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
12
---
23
title: Frame
34
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_frame_.frame
4-
contributors: [rigor789]
5+
contributors: [rigor789, PieterHartzer]
56
---
67

78
`<Frame>` is a UI component used to display [`<Page>`](/en/docs/elements/components/page) elements. Every app needs at least a single `<Frame>` element, usually set as the root element.
@@ -42,6 +43,25 @@ If you need to create multiple frames, you can do so by wrapping them in a Layou
4243
</Frame>
4344
```
4445

46+
##### A frame with a default page from an external component
47+
48+
```html
49+
<Frame>
50+
<Page>
51+
<Home />
52+
</Page>
53+
</Frame>
54+
```
55+
56+
```js
57+
import Home from './Home'
58+
59+
export default {
60+
components: {
61+
Home
62+
}
63+
}
64+
```
4565

4666
## Native component
4767

0 commit comments

Comments
 (0)