Nativescript-angular: Implement ActionItem (customView/actionView)

Created on 13 Apr 2016  路  1Comment  路  Source: NativeScript/nativescript-angular

I don't think this is possible with {N} + ng2 yet (unless there's an unknown trick to it):

<ActionBar>
  <ActionBar.actionItems>
    <ActionItem tap="navigate">
      <ActionItem.actionView>
        <StackLayout orientation="horizontal">
          <Label text="Green" color="green" />
          <Label text="Red" color="red" />
        </StackLayout>
      </ActionItem.actionView>
    </ActionItem>
  </ActionBar.actionItems>
</ActionBar>

This would also allow custom fonts (I think) to be used with ActionItems?
Would love to be able to use this on ActionItems: https://github.com/NathanWalker/nativescript-ng2-fonticon

Should be based on the implementation from here:
https://github.com/NativeScript/NativeScript/pull/1554

Most helpful comment

Nvm, this is totally possible. very simply:

<ActionItem>
   <Button class="fa" [text]="'fa-bars' | fonticon"></Button>
</ActionItem>

Awesome.

>All comments

Nvm, this is totally possible. very simply:

<ActionItem>
   <Button class="fa" [text]="'fa-bars' | fonticon"></Button>
</ActionItem>

Awesome.

Was this page helpful?
0 / 5 - 0 ratings