question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tabs] md-tab-link: routerLinkActive.isActive error

See original GitHub issue

Trying to use the new md-tab-nav-bar like this:

<nav md-tab-nav-bar>
	<a md-tab-link routerLink="/admin/management" routerLinkActive #rla="routerLinkActive" [active]="rla.isActive">Management</a>
</nav>

but get an error

TypeError: Cannot read property ‘some’ of undefined

Seems like this way should work after commit: https://github.com/angular/angular/commit/c9f58cf78cce420762c7f8c51172a10a497468ea

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:44 (16 by maintainers)

github_iconTop GitHub Comments

8reactions
blyndcidecommented, Feb 16, 2017

Ok I got [active] set correctly this way:

<nav md-tab-nav-bar>
	<a md-tab-link routerLink="/admin/management" routerLinkActive #rla1="routerLinkActive" [active]="rla1.isActive">Management</a>
	<a md-tab-link routerLink="/admin/profile" routerLinkActive #rla2="routerLinkActive" [active]="rla2.isActive">Profile</a>
</nav>

Thanks to all who helped fix this.

8reactions
adrmcommented, Feb 2, 2017

Setting version to Angular 2.4.5 fixed it for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Material 2 Tabs - Stack Overflow
You should be using index to set the active class to the tab, <nav md-tab-nav-bar> <a md-tab-link [routerLink]="['/page1']" ...
Read more >
Demonstration of md-tab-link: routerLinkActive.isActive error
IMPORTANT: Best practice is to set <base href="/"> but, because of some prefixing to the url done by plunkr, this throws an error:...
Read more >
dynamically specify the content of a Material Design tab?
I would like to bind the content and label of an <md-tab> from the data source. In the component source, I have an...
Read more >
angular/material2 - Gitter
Hey guys, has anybody seen this?: "ERROR in Unexpected value 'CdkTableModule in c:/work/spoch-dashboard/node_modules/@angular/cdk/cdk.d.ts' ...
Read more >
Tabs - The routerLinkActiveOptions attribute is not applied to ...
DevExpress Support Team: CLONED FROM T618449: Active Tab] I have 2 ... <dxi-item routerLink="passwords" routerLinkActive="active-route" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found