我有两个页面可以说是页面a和页面B,我想使用angular将数据从页面a传输到页面B. [英] I have two pages lets say page a and page B , I want to transfer data from page a to page B using angular
本文介绍了我有两个页面可以说是页面a和页面B,我想使用angular将数据从页面a传输到页面B.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将数据从一个页面传输到另一个页面
我尝试过:
i want to transfer data from one page to another page
What I have tried:
<table style="width:100%"><tbody>
<tr ng-repeat="item in user | filter : tableSearch | limitTo : pageSize">
<td>{{item.id}}</td>
<td>{{item.title}}</td>
<td><input type="button" value="ViewDetails" ng-click="viewDetails(item.id)"/></td>
<td><input type="button" value="DeleteRow" ng-click="deleteRow()"/></td>
</tr>
</tbody>
</table>
$scope.viewDetails=function(id)
{
// alert(id);
//$location.url('http://www.google.com');
//$location.path('http://www.google.com');
$window.location.href = 'viewDetails.html';
// $state.go('/viewDetails', {id: id});
//$location.path("viewDetails"+id);
};
推荐答案
scope.viewDetails = function(id)
{
// alert(id);
//
scope.viewDetails=function(id) { // alert(id); //
location.url('http://www.google.com');
//
location.url('http://www.google.com'); //
location.path('http://www.google.com');
location.path('http://www.google.com');
这篇关于我有两个页面可以说是页面a和页面B,我想使用angular将数据从页面a传输到页面B.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文