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

Commit 7bbdfa7

Browse files
authored
Merge pull request #740 from NativeScript/niliev/action-bar-ng
added disclaimer about platform-specifrc tags usage in Actionbar
2 parents e27ecb5 + b55c780 commit 7bbdfa7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ui/action-bar.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To define the ActionBar include the `ActionBar` tag inside a component template:
4949
```XML
5050
<ActionBar title="Custom Title"></ActionBar>
5151
```
52-
If more than one component defines an `ActionBar` - the last definition will be respected. You can also [add items to the current ActionBar](#adding-actions-to-existing-action-bar).
52+
If more than one component defines an `ActionBar` - the last definition will be respected. You can also [add items to the current ActionBar](#adding-actions-to-existing-actionbar).
5353

5454
>Note: To show the ActionBar on the initial page of your application use the `startPageActionBarHidden: false` app option when bootstrapping the application.
5555
@@ -112,6 +112,11 @@ The result is:
112112

113113
> **Note**: You can use CSS to style the elements inside the `titleView`.
114114
115+
{% angular %}
116+
> **Important**: Platform specific tags (e.g. `<ios>` and `android`) can't be used in Angular based project.
117+
Use structural directives like `*ngIf` to create platform specific logic for your ActionBar.
118+
{% endangular %}
119+
115120
## Setting the App Icon for Android
116121
You can set the application icon only for Android. By default, the application icon is hidden. You can show it by setting the `android.iconVisibility` property to `always`.
117122

@@ -456,6 +461,7 @@ For iOS, this code adds a regular `ActionItem` with `position` set to `left`. Us
456461

457462
{% nativescript %}
458463
>Note: The `<android>` and `<ios>` tags are used inside the XML to define platform-specific elements.
464+
>Important: The platform specifc tags (`<android>` and `<ios>`) will work only in non-Angular based project.
459465
{% endnativescript %}
460466

461467
{% nativescript %}
@@ -496,6 +502,7 @@ The result is:
496502
![side-drawer-android](../img/modules/action-bar/side-drawer-android.png "side-drawer-android")
497503

498504
{% angular %}
505+
499506
## Adding Actions To Existing ActionBar
500507
Using the `ActionBarExtension` component you can add additional action items to the current `ActionBar`. This is useful if you are writing a reusable component that exposes an action (ex. "save"), but you don't want to override the whole `ActionBar`.
501508

0 commit comments

Comments
 (0)