I use service to share data cross controllers and it works.
First page use a controller named ACtrl
:
<a ng-click='doit()'>click me</a>
Second page use a different controller BCtrl
:
<label>{{person.name}}</label>
In doit
function, I shared an object using service. In BCtrl I get the share object ,all is fine.
But I want the second page open an another window, so I change first page as below:
<a ng-click='doit()' href='_blank'>click me</a>
Then second page doesn't work. So how to resolve this problem?