如何测试 ng-if 中的地图中是否存在值?
$scope.textInputTypes = {
"currency": true,
"double": true,
"percent": true,
"int": true,
"email": true,
"phone": true,
"string": true,
"textarea": true,
"url": true
};
ng-if='mytype in textInputTypes'
这给了我一个错误:
语法错误:标记“in”是表达式 [mytypeNaNn textInputTypes] 的第 17 列中的意外标记,从 [in textInputTypes] 开始。