Are complex expressions possible in ng-hide / ng-show?

前端 未结 5 1056
难免孤独
难免孤独 2020-12-07 16:04

I want to do so:

ng-hide=\"!globals.isAdmin && mapping.is_default\"

but the expression evaluates always to false.

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 16:59

    This will work if you do not have too many expressions.

    Example: ng-show="form.type === 'Limited Company' || form.type === 'Limited Partnership'"

    For any more expressions than this use a controller.

提交回复
热议问题