Angular 2+ 中 ngShow 和 ngHide 的等價物是什麼? - What is the equivalent of ngShow and ngHide in Angular 2+?

問題:

I have a number of elements that I want to be visible under certain conditions.我有許多元素希望在某些條件下可見。

In AngularJS I would write在 AngularJS 中,我會寫

<div ng-show="myVar">stuff</div>

How can I do this in Angular 2+?我怎樣才能在 Angular 2+ 中做到這一點?


解決方案:

參考一: https://en.stackoom.com/question/2PHU3
參考二: https://stackoom.com/question/2PHU3
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章