我不知道为什么ng-href
无法正常工作。
我想要做的是从modal
去view
,传递参数{{user}}
和{{email}}
ng-href url not working
这里的状态从控制器
$scope.goToState = function() {
$state.go('gestion', {user:'$scope.user', email: '$scope.email'});}
$范围
//gestion
.state('gestion',
{
url:'/compte/gestion/:user/:email',
templateUrl:'templates/gestion.html',
controller:'loginCtrl'
})
代码。用户和$ scope.email是我从外部URL检索到的两个值
,这里是从view
行与ng-href
<ion-item ng-click="goToState()" style="width:340px;margin-top:10px" >
Gerer mon compte
</ion-item>
谢谢大家帮忙
我试过你的解决方案。当我点击该项目,其他视图不出现。没有错误或警告。= –
只要确保你传递的有效参数在$状态。去()'。我只是提到样本。让我看看你的代码(更新你的代码) –