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

docs: add a note about router-outlet specifics #1268

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/core-concepts/angular-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ One thing you might have noticed in the code above is the `nsRouterLink` directi

## Router Outlet

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

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

> **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:
```HTML
<GridLayout rows="*">
<router-outlet row="0"></router-outlet>
</GridLayout>
```

## Page Router Outlet

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