我正在使用UI-Router进行路由。 当我使用此代码加载.html页面时:
<form method="post" action="index.php">
<strong>Your name:</strong><br />
<input maxlength="30" type="text" name="name" />
<br />
<strong>Your Email for response:</strong><br />
<input maxlength="30" type="text" name="email" />
<br />
<strong>Yuur massage</strong><br />
<textarea rows="7" cols="50" name="mess"></textarea>
<p>
<input type="submit" value="Send"/>
</p>
</form>
<?php
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST['email'])) {$email = $_POST['email'];}
if (isset($_POST['mess'])) {$mess = $_POST['mess'];}
$to = "engenes511@gmail.com";
$headers = "Content-type: text/plain; charset=windows-1251\r\nFrom: <e9228098808@yandex.ru>";
$subject = "Message from your site";
$message = "Sender name: $name \nE-mail: $email \nMassage: $mess";
$send = mail ($to, $subject, $message, $headers);
if ($send == 'true')
{
echo "<b>Thank you for sending your message!<p>";
echo "<a href='feedback.html'>Click to return</a>";
}
else
{
echo "<p><b>Error. Message not sent!";
}
?>
invoice-list.html
$stateProvider.state("admin.cabletv.all-invoice", {
url: "/all-invoice",
templateUrl: "app/invoice/invoice-list.html",
params: {
'type': '1'
},
cache: false
});
我的控制器的一部分
<div class="panel panel-primary" ng-controller="pqsInvoiceListController as model">
<div class="panel-heading">
<div class="row">
<div class="col-sm-2">{{model.pageTitle}}</div>
<div class="col-sm-2 col-sm-offset-8">
<button class="btn btn-default" ng-click="model.printInvoice()">Print</button>
</div>
</div>
</div>
<div class="panel-body">
<div style="overflow-x: auto">
<table class="table table-bordered">
<thead>
<tr>
<th><input type="checkbox" ng-model="model.selectedAll" ng-change="model.checkAll()" autocomplete="off" /></th>
<th>In. no</th>
<th>Type</th>
<th>Client</th>
<th>Client Id</th>
<th>Mobile No</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="invoice in model.invoices">
<td><input type="checkbox" ng-model="model.idList[invoice.id].isSelected"/></td>
<td>{{invoice.id}}</td>
<td>{{invoice.invoiceType | pqsInvoiceType}}</td>
<td>{{invoice.connection.client.name}}</td>
<td>{{invoice.connection.client.id}}</td>
<td>{{invoice.connection.client.mobileNumber1}}</td>
</tr>
<tr ng-if="model.invoices.length">
<td colspan="12">Total</td>
<td>{{model.totalAmount}}</td>
<td colspan="4"></td>
</tr>
</tbody>
</table>
</div>
</div>
已加载invoice-list.html 页面,但此页面中的控件(复选框)无效。当我点击复选框时它不起作用。如果我使用F5重新加载页面,那么它工作正常。如何在不重新加载页面的情况下解决此问题。