久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <bdo id='gHygo'></bdo><ul id='gHygo'></ul>
  1. <legend id='gHygo'><style id='gHygo'><dir id='gHygo'><q id='gHygo'></q></dir></style></legend>

    <small id='gHygo'></small><noframes id='gHygo'>

      <i id='gHygo'><tr id='gHygo'><dt id='gHygo'><q id='gHygo'><span id='gHygo'><b id='gHygo'><form id='gHygo'><ins id='gHygo'></ins><ul id='gHygo'></ul><sub id='gHygo'></sub></form><legend id='gHygo'></legend><bdo id='gHygo'><pre id='gHygo'><center id='gHygo'></center></pre></bdo></b><th id='gHygo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gHygo'><tfoot id='gHygo'></tfoot><dl id='gHygo'><fieldset id='gHygo'></fieldset></dl></div>
    1. <tfoot id='gHygo'></tfoot>

      是否可以使用 Angular2 有條件地顯示元素屬性?

      Is it possible to conditionally display element attributes using Angular2?(是否可以使用 Angular2 有條件地顯示元素屬性?)
      <i id='mNgDi'><tr id='mNgDi'><dt id='mNgDi'><q id='mNgDi'><span id='mNgDi'><b id='mNgDi'><form id='mNgDi'><ins id='mNgDi'></ins><ul id='mNgDi'></ul><sub id='mNgDi'></sub></form><legend id='mNgDi'></legend><bdo id='mNgDi'><pre id='mNgDi'><center id='mNgDi'></center></pre></bdo></b><th id='mNgDi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mNgDi'><tfoot id='mNgDi'></tfoot><dl id='mNgDi'><fieldset id='mNgDi'></fieldset></dl></div>

        <legend id='mNgDi'><style id='mNgDi'><dir id='mNgDi'><q id='mNgDi'></q></dir></style></legend>
      • <tfoot id='mNgDi'></tfoot>
            <tbody id='mNgDi'></tbody>

            <small id='mNgDi'></small><noframes id='mNgDi'>

              <bdo id='mNgDi'></bdo><ul id='mNgDi'></ul>

              • 本文介紹了是否可以使用 Angular2 有條件地顯示元素屬性?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有一些代碼在元素上使用 Polymer 屬性,例如:

                I have some code that uses Polymer attributes on elements, for example:

                <paper-drawer-panel force-narrow>

                聚合物的工作方式是,如果我想禁用該屬性,我不能簡單地說 force-narrow="false",它必須完全刪除.Angular2中有沒有辦法有條件地刪除整個屬性?我似乎找不到有關(guān)此主題的任何信息.我可以使用 ngIf 并在有和沒有屬性的情況下重復整個元素,但如果可能的話我寧愿不這樣做.謝謝!

                The way polymer works is that I can't simply say force-narrow="false" if I want to disable the attribute, it has to be removed altogether. Is there a way in Angular2 to conditionally remove the entire attribute? I can't seem to find any information on this topic. I could use ngIf and repeat the entire element with and without the attribute but I would rather not if possible. Thanks!

                編輯 - 為什么這個問題被標記為重復并關(guān)閉?我在有問題的重復帖子之前問了這個問題.天哪,這個網(wǎng)站有時很糟糕.

                Edit - Why was this question marked and closed as a duplicate? I asked this question a month before the duplicate post in question. God this site sucks sometimes.

                編輯 2 - 我了解規(guī)則,但仍然覺得有權(quán)投訴.

                Edit 2 - I understand the rules, but still feel entitled to complain.

                推薦答案

                簡單的屬性綁定做你想做的事:

                Simple attribute binding does what you want:

                [attr.force-narrow]="someField ? true : null" 
                

                someFieldfalse 時該屬性不會被移除,只有當它為 null

                the attribute is not removed when someField is false, only when it's null

                這篇關(guān)于是否可以使用 Angular2 有條件地顯示元素屬性?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態(tài)元素 - Angular 2 amp;離子2)
                How to reload the ion-page after pop() in ionic2(如何在 ionic2 中的 pop() 之后重新加載離子頁面)
                Retrieve localstorage value when value is change in Ionic 2(當 Ionic 2 中的值發(fā)生變化時檢索本地存儲值)

                <small id='9EXKW'></small><noframes id='9EXKW'>

              • <legend id='9EXKW'><style id='9EXKW'><dir id='9EXKW'><q id='9EXKW'></q></dir></style></legend>

                  <tbody id='9EXKW'></tbody>

                • <bdo id='9EXKW'></bdo><ul id='9EXKW'></ul>
                    1. <tfoot id='9EXKW'></tfoot>
                        1. <i id='9EXKW'><tr id='9EXKW'><dt id='9EXKW'><q id='9EXKW'><span id='9EXKW'><b id='9EXKW'><form id='9EXKW'><ins id='9EXKW'></ins><ul id='9EXKW'></ul><sub id='9EXKW'></sub></form><legend id='9EXKW'></legend><bdo id='9EXKW'><pre id='9EXKW'><center id='9EXKW'></center></pre></bdo></b><th id='9EXKW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9EXKW'><tfoot id='9EXKW'></tfoot><dl id='9EXKW'><fieldset id='9EXKW'></fieldset></dl></div>
                          主站蜘蛛池模板: 日本中出视频 | 国产成人精品一区二区三区 | 亚洲国产日韩一区 | 亚洲91| 国产区在线 | 精品九九九 | 99re热精品视频 | 国产综合久久久久久鬼色 | 成人深夜福利在线观看 | 精品色 | 国产一区二区三区视频免费观看 | 日本久久一区 | 国产一区久久精品 | 成人99| 久久精品亚洲一区 | 成人av播放| 久久av网站 | 在线视频一区二区三区 | 国产美女视频一区 | 欧美人成在线视频 | 91网站在线看 | 亚洲精品www | 国产精品3区 | 成人午夜激情 | 亚洲福利在线视频 | 国产剧情久久 | 国产成人免费在线观看 | 久久久久国产精品 | 欧美日韩综合 | 国产91在线播放 | 久久一区二区三区四区 | 国产一级在线 | 国产欧美日韩综合精品一 | 欧美亚洲激情 | 免费黄色a视频 | 日韩精品一区二区三区视频播放 | 一区二区日本 | 国产天天操 | 欧美精品一区二区蜜桃 | 99re热这里只有精品视频 | 国产一区二区三区 |