我想做这样的事情.
<h3 ng-show="{{mode == 'create'}}">Create Vacancy</h3> <h3 ng-show="{{mode == 'edit'}}">Edit this Vacancy</h3>
$scope.mode是“创建”或“编辑”的位置.
我该怎么做呢?我正在尝试什么都没有.
解决方法
ng-show evals表达式本身,所以不要使用插值文本.将您的代码更新为:
<h3 ng-show="mode == 'create'">Create Vacancy</h3> <h3 ng-show="mode == 'edit'">Edit this Vacancy</h3>