1.通过js拼写的html进行双向绑定(ng-model), 不太好用;
2.通过路由加载页面时,路由中的模态框中的值无法进行双向绑定;
3.angular的ng-if标签下,使用双向绑定,双向绑定不好用,一旦手动填写内容,则双向绑定异常;
<div ng-if="initialLinka==0">
<div class="col-sm-5">
<input id="stageNuma" ng-model="stageNuma" ng-init="stageNuma=1" value="1" name="stageNum" class="input form-control" placeholder="请输入环节ID" required ng-focus readonly="readonly">
</div>
<div class="col-sm-3">
<span class="valid" ng-show="repeatStageNum">初始环节已存在</span>
</div>
</div>
<div ng-if="initialLinka==1">
<div class="col-sm-5">
<input type="text" id="stageNuma" ng-model="stageNuma" ng-blur="validStageNum('stageNuma', 'update', 1)" name="stageNum" class="input form-control" placeholder="请输入环节ID" required ng-focus>
</div>
<div class="col-sm-3">
<span class="valid" ng-show="requiredStageNum">必填项</span>
</div>
<div class="col-sm-12">
<div class="col-sm-4"></div>
<div class="col-sm-6" style="left: -5px;">
<span class="valid" ng-show="idRegex">请输入1-4位以内数字</span>
<span class="valid" ng-show="idRegex1">普通环节ID不能为1</span>
<span class="valid" ng-show="repeatStageNum">环节ID已存在</span>
</div>
</div>
</div>