ng-if="self_employment.business_type != 'Trust' || self_employment.business_type !== 'Partnership'"
答案 0 :(得分:0)
使用!=代替!==:
ng-if="self_employment.business_type != 'Trust' || self_employment.business_type != 'Partnership'"
答案 1 :(得分:0)
当您遇到此类问题时,首先检查对象是否已定义。在Html /控制台中打印 {{self_employment.business_type}} 。如果它来了“trust / partnership”那么它是小写。如果它是小写,则可能导致条件失败。
"trust" === "Trust" // false
"trust" == "Trust" // false
"trust" == "trust" // true