Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit cc07833

Browse files
authored
Merge pull request #1268 from NativeScript/niliev/router-outlet
docs: add a note about router-outlet specifics
2 parents 183a8dd + 756457e commit cc07833

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/core-concepts/angular-navigation.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ One thing you might have noticed in the code above is the `nsRouterLink` directi
5656

5757
## Router Outlet
5858

59+
The `router-outlet` acts as a placeholder that Angular dynamically fills based on the current router state.
5960
Let's take a look at the following example that uses `<router-outlet>`:
6061

6162
{%snippet router-outlet-example%}
@@ -65,6 +66,13 @@ The result is that with each navigation the content of the `router-outlet` is re
6566
![router-outlet-ios](../img/navigation-angular/outlet-ios.gif "RouterOutlet IOS")
6667
![router-outlet-Android](../img/navigation-angular/outlet-android.gif "RouterOutlet Android")
6768

69+
> **Note:** In the context of NativeScript the `router-outlet` placeholder always needs to be wrapped in a native layout and can't be the root level element. For example:
70+
```HTML
71+
<GridLayout rows="*">
72+
<router-outlet row="0"></router-outlet>
73+
</GridLayout>
74+
```
75+
6876
## Page Router Outlet
6977

7078
Here is a similar example using the `page-router-outlet`:

0 commit comments

Comments
 (0)