我有一个带有 3 个选项卡的应用程序,每个选项卡都从外部文件加载自己的模板。来自第一个选项卡的 ng-model 问题不会发送到第三个选项卡。
第一个文件:
<div class="row">
<div class="span2 text-right">*Reported By:</div>
<div class="span2"><input type="text" ng-model="date" required></div>
<div class="span2 text-right">*Well Number:</div>
<div class="span2">
<select ng-model="well" required ng-change="wellFunc(well)" required>
<option ng-selected>Well-01</option>
<option>Well-02</option>
<option>Well-03</option>
</select>
</div>
</div>
第二:
<table class="table table-hover table-striped">
<tr>
<th><strong>General Information:</strong></th>
</tr>
<tr>
<td ng-model="date"></td>
</tr>
</table>
我也使用ui-router,也许路由器有问题?
var myApp = angular.module('myApp', ["ui.router"])
myApp.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise("/re");
$stateProvider
.state('re', {
url: "/re",
templateUrl: "template/general.html"
})
.state('ro', {
url: "/ro",
templateUrl: "template/corrective.html"
})
.state('ri', {
url: "/ri",
templateUrl: "template/result.html"
})
});