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
Tabmenuitem float to the right?
-
- Information
-
Who is online
Users browsing this forum: No registered users and 16 guests