首页 文章

无法在progressbar angular2材质的不确定模式下应用可见性

提问于
浏览
-2
<md-progress-bar color="warn" mode="indeterminate" [class.hide]="visible"></md-progress-bar>

Angular2材料2.0.0-beta.1

https://plnkr.co/edit/sHtce9IcdCXuLb8kPhgr?p=preview

I raised an issue in the angular2 material, it was resolved and pushed the changes to master branch. https://github.com/angular/material2/issues/2413 If anybody experiencing the same issue with beta.1 release please use the npm install https://github.com/angular/material2-builds.git to resolve this behavior

2 回答

  • 1

    如果您不想再次安装,可以使用div围绕栏 . 如下

    <div  [hidden]="showLoading">
    <md-progress-bar
      mode="indeterminate"
      aria-label="Loading"></md-progress-bar></div>
    
  • 0

    您可以使用接收布尔值的[hidden]指令 .

    例如:

    [hidden]="true"
    

相关问题