Javascript 如何在js中将JSON字符串从一个视图传递到另一个控制器

Javascript 如何在js中将JSON字符串从一个视图传递到另一个控制器,javascript,angularjs,json,ionic-framework,ionic-view,Javascript,Angularjs,Json,Ionic Framework,Ionic View,我在视图中循环Json数组,我想将该项传递给另一个控制器。如何将item对象(JSON)从html视图页面传递到ionic中的另一个控制器 rentlist.html <ion-item style="padding: 2px; border-width: 0px;" ng-repeat="acc in accs" item="acc" > <div id="wrapper" class="item item-word-wrap" ng

我在视图中循环Json数组,我想将该项传递给另一个控制器。如何将item对象(JSON)从html视图页面传递到ionic中的另一个控制器

rentlist.html   
    <ion-item style="padding: 2px; border-width: 0px;" ng-repeat="acc in accs"
            item="acc" >
  <div id="wrapper" class="item item-word-wrap" ng-click="selectAcc(acc)">
<table style="table-layout: auto; width: 100%;">
            <tr>
              <td style="width: 25%;">
                <div id="first">
                    <img style="display: inline-block;" ng-src="{{acc.image}}">
                </div>
              </td>
              <td style="width: 55%; vertical-align: top;">
                <div id="second">
                  <div id="third">{{acc.title}}</div>
                  <div id="fourth">{{acc.address}}</div>
                  <div id="fifth"><a ng-href="#/detail/{{acc}}">View Details</a></div>
                </div>


 app.js
.state('detail', {
  url: '/detail/{acc:json}',
  templateUrl: 'js/detail.html',
  controller: 'detailCtrl'
  })

 detail.js 
$scope.accs = [];
rentlist.html
{{acc.title}}
{{acc.address}
app.js
.state('详细信息'{
url:“/detail/{acc:json}”,
templateUrl:'js/detail.html',
控制器:“detailCtrl”
})
detail.js
$scope.accs=[];
$scope.accs=$stateParams.acc

This is the JSON data which i need to send it to other controller 
<a ng-href="#/detail/{&quot;address&quot;:&quot;Lachs Straße&quot;,&quot;contact_number&quot;:&quot;0160933&quot;,&quot;description&quot;:&quot;Quiet and cozy flat with big windows and essential furniture.&quot;,&quot;title&quot;:&quot;Single-room apartment for three semesters&quot;,&quot;type&quot;:&quot;Flat&quot;,&quot;total_size&quot;:50,&quot;img&quot;:&quot;img/studierent_logo.png}
这是我需要发送给其他控制器的JSON数据

可能的复制品你看过这个了吗?我试过了,但没用。它将进入登录页面。我正在显示项目列表。在每个项目中,我都添加了一个链接,单击该链接后,应导航到另一个查看页面。但这并没有发生。