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.

md-ink-bar not visible using <nav md-tab-nav-bar>

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

md-ink-bar should be visible

What is the current behavior?

bildschirmfoto 2017-02-15 um 12 25 25

md-ink-bar is not visible. The .mat-ink-bar class is not changed when clicking the tabs:

.mat-ink-bar {
    position: absolute;
    bottom: 0;
    height: 2px;
    transition: .5s cubic-bezier(.35,0,.25,1);
}

What are the steps to reproduce?

http://plnkr.co/edit/qXJdsDIr5pwXxCdbRyLL

The plunker includes a simple example, however I could not get the router to work correctly, because I am not familiar with plunker.

What is the use-case or motivation for changing an existing behavior?

<nav md-tab-nav-bar> should yield the same presentation as <md-tab-group>

Which versions of Angular, Material, OS, browsers are affected?

Tested on angular 2.3 and 2.4, material2 2.0.0-beta.2, Chrome v56

Is there anything else we should know?

nope

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

19reactions
willshowellcommented, Jul 22, 2017

@Pikachews The reason this doesn’t work for you (and using *ngFor does) is because of your redefining of #rla which has a template-wide scope. The following should work

<nav md-tab-nav-bar>
  <a md-tab-link routerLink="./foo" routerLinkActive #rlaFoo="routerLinkActive" [active]="rlaFoo.isActive">Foo</a>
  <a md-tab-link routerLink="./bar" routerLinkActive #rlaBar="routerLinkActive" [active]="rlaBar.isActive">Bar</a>
</nav>
5reactions
andrewseguincommented, Feb 16, 2017

I’m seeing an issue where the ink bar does not show up with the correct width but it does show up. Will begin working on the issue I see, but I cannot reproduce your case.

Can you fork my plunker and try to reproduce with it? Note that you do not need to use the router, just manipulate the active input manually.

http://plnkr.co/edit/AGSBYVx4ucPVmXOd7abT?p=preview

Read more comments on GitHub >

github_iconTop Results From Across the Web

<nav>: The Navigation Section element - MDN Web Docs
The HTML element represents a section of a page whose purpose is to provide navigation links, either within the current document or to...
Read more >
Extend Angular Component ( Only decorator)
This is a workaround. I created a new directive @Directive({ selector: '[myTabNavBar]', }) export class TabNavBarDirective ...
Read more >
HTML nav hidden Attribute
The hidden attribute on a nav element hides that element. Althought not visible, the element's position on the page is maintained.
Read more >
HTML nav Tag
Definition and Usage. The <nav> tag defines a set of navigation links. Notice that NOT all links of a document should be inside...
Read more >
H97: Grouping related links using the nav element
The nav element is one of several sectioning elements in HTML5. Use of this markup can make groups of links easier to locate...
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