Material: md-nav-bar throws error when used with md-nav-sref.

Created on 23 Aug 2016  路  4Comments  路  Source: angular/material

Actual Behavior:

  • What is the issue? *
    When md-nav-sref causes a state change that replaces the md-nav-bar, the updateTabs method runs and throws an error.
  • What is the expected behavior?
    The updateTabs shouldn't run after the scope has been destroyed.

CodePen (or steps to reproduce the issue): *

Angular Versions: *

  • Angular Version: 1.5.5
  • Angular Material Version: 1.1.0

Additional Information:

  • Browser Type: * Chrome
  • Browser Version: * 52
  • OS: * Ubuntu
  • Stack Traces:
Pull Request fixed bug

Most helpful comment

Facing exact same issue when using ui-router and md-nav-sref.

This is the error message I get.

TypeError: Cannot read property 'getName' of undefined
    at angular-material.min.js:10
    at o._findTab (angular-material.min.js:10)
    at o._getTabByName (angular-material.min.js:10)
    at o._updateTabs (angular-material.min.js:10)
    at angular-material.min.js:10
    at angular.js:19612
    at e (angular.js:5964)
    at angular.js:6243

P.S: Adding the error message so that other can find this issue by error message.

All 4 comments

Facing exact same issue when using ui-router and md-nav-sref.

This is the error message I get.

TypeError: Cannot read property 'getName' of undefined
    at angular-material.min.js:10
    at o._findTab (angular-material.min.js:10)
    at o._getTabByName (angular-material.min.js:10)
    at o._updateTabs (angular-material.min.js:10)
    at angular-material.min.js:10
    at angular.js:19612
    at e (angular.js:5964)
    at angular.js:6243

P.S: Adding the error message so that other can find this issue by error message.

This should be resolved when #9071 lands.

@Splaktar I tested the codepen above with version 1.1.2 and 1.1.6 and it looks for me that #9071 fixed it. So I would suggest closing it and reassign milestone 1.1.2 since it was fixed there.

@IMM0rtalis thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chriseyhorn picture chriseyhorn  路  3Comments

rtprakash picture rtprakash  路  3Comments

bobber205 picture bobber205  路  3Comments

robertmesserle picture robertmesserle  路  3Comments

kasajian picture kasajian  路  3Comments