我試圖在不使用服務的情況下在html頁面之間傳遞表單數據。使用角度在html頁面之間傳遞數據
這是我的代碼鏈接 - >http://plnkr.co/edit/E6LM5Oq67XRcvVuMIv9i?p=preview 下面是我的contacts.html頁面。
<html>
<head>
<title>Contacts Page</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.js"></script>
<script src="app.js"></script>
</head>
<body ng-app="myApp" >
<table>
<tr>
<th>User ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Phone Number</th>
</tr>
<tr ng-repeat="contact in contacts">
<td>{{contact.uid}}</td>
<td>{{contact.fname}}</td>
<td>{{contact.lname}}</td>
<td>{{contact.pphone}}</td>
</tr>
</table>
</body>
</html>
該數據沒有傳遞給contacts.html.How to do this?
請在你的問題的所有相關信息(包括代碼)。看看[問]和[mcve]。 –
發佈代碼 – Coded9
兩者都是不同的HTML頁面。你不能傳遞那樣的數據。 – SaiUnique