我是angularJs新手。隐藏和显示在angularjs
这是我的位级视图
<input type="text" ng-model="todoName" size="30"
placeholder="Add Your Name">
<input type="text" ng-model="todoAge" size="30"
placeholder="Add Your Age">
<input type="hidden" ng-model="todoId" />
<form style="display:'?????????'" ng-submit="addTodo()">
<input class="btn-primary" type="submit" value="add">
</form>
<form style="display:'?????????'" ng-submit="addTodo()">
<input class="btn-primary" type="submit" value="update">
</form>
,这是我angularjs位级编码
$scope.DisplayUpdate = "none";
我有一个screan用于管理学生的详细信息,我想显示添加按钮时,第一次此时隐藏更新按钮,当更新时间显示更新按钮时,此时添加按钮需要隐藏。
看到这行设置为隐藏,并采用了棱角分明的js脚本的一面展现细节:$scope.DisplayUpdate = "none";
如何我设置我的按钮样式这个价值?
<form style="display:'?????????'" ng-submit="addTodo()">
<input class="btn-primary" style="display:'?????????'" type="submit" value="add">
</form>
http://angulartutorial.blogspot.in/2014/04/show-and-hide-in-angular-js.html – Prashobh