Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

crash with 2.0.0-beta.8 #270

@alexfung888

Description

@alexfung888

I got

ERROR Error: Uncaught (in promise): TypeError: _this._renderer.setStyle is not a function
TypeError: _this._renderer.setStyle is not a function
    at http://localhost:4200/vendor.bundle.js:15947:29
    at Array.forEach (native)
    at LayoutDirective.BaseFxDirective._applyStyleToElement (http://localhost:4200/vendor.bundle.js:15946:29)
    at LayoutDirective._updateWithDirection (http://localhost:4200/vendor.bundle.js:32683:14)

on beta8 but runs smooth on beta7.

After cutting away most of the code, it boils down to this:
\src\app\auth\login\login.component.html

  <md-tab label="Password" *ngIf='true'>
      <md-card fxFlex="0 1 18em" fxFlex.xs='100'>
        <md-card-header class="md-primary md-hue-1">
          <b>Local identity (email+password)</b>
        </md-card-header>
        <md-card-content>
          hello world
        </md-card-content>
      </md-card>
  </md-tab>

I want to hide a tab (not disable) with 'media$ | async', but the code now crashes with anything in the ngif. Without the ngIf, it won't crash.

however, if I build a new app with just an md-tab and ngif, it won't crash. Some the key is more than mdtab+ngif.

I have just updated everything on 29/4/2017 morning:

  • node 790
  • npm 450
  • angular 410
  • angular CLI 101
  • angular material 200beta3
  • angular flex-layout:
  • project does not crash with 2.0.0-beta.7
  • project crashes with 2.0.0-beta.8

trimmed source code:
200b8.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical issue that needs to be resolved immediatelyhas prA PR has been created to address this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions