Tabmenuitem float to the right?

UI Components for Angular
Post Reply
JimS
Posts: 3
Joined: 09 Jun 2016, 01:51

11 Jun 2016, 12:03

I'm trying to push a tab to the right through the attribute style, but it won't work.
ngOnInit() {
this.items = [
{label: 'Stats', icon: 'fa-bar-chart'},
{label: 'Calendar', icon: 'fa-calendar'},
{label: 'Documentation', icon: 'fa-book'},
{label: 'Support', icon: 'fa-support'},
{label: 'Social', icon: 'fa-twitter'},
{label: 'Profile', icon: 'fa-user', style:'float:right'},
];
}

This gives the error:
error TS2322: Type '({ label: string; icon: string; routerLink: string[]; } | { label: string; icon: string; style: s...' is not assignable to type 'MenuItem[]'.
Type '{ label: string; icon: string; routerLink: string[]; } | { label: string; icon: string; style: st...' is not assignable to type 'MenuItem'.
Type '{ label: string; icon: string; style: string; routerLink: string[]; }' is not assignable to type 'MenuItem'.
Object literal may only specify known properties, and 'style' does not exist in type 'MenuItem'.


Is there an ng2-way to style tabs? I could of course create two separate tabsmenus and place them in the navbar, but I would prefer an ng2-way...


/Jim

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests