ngIf
is basically a version of ngSwitch
with a single condition. It's different from ngShow
in that it removes the actual DOM element rather than simply hiding it. If you're using an ngSwitch
with just a singly truthy condition check, then I believe ngIf
will do the same thing.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…