問題:
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