angular js 页面跳转

超链接的方式:

 

{{row.attrs.name}}


2. 刷新页面的方式:
var curWwwPath=window.document.location.href;
var pos=curWwwPath.lastIndexOf("/");
var base= curWwwPath.substring(0,pos);
alert(base);

location.href = base + "/backplayroom_edit-" + type;


3:不刷新页面 :
$scope.transferFail = function(id) {
$state.go("msg_send", {
userId : id
});
};

$stateProvider.state("home", {
url : "/home",
controller : "HomePageCtl",
templateUrl : "home.html"
}).state("withdraw", {
url : "/withdraw",
controller : "WithdrawCtl",
templateUrl : "withdraw.html"
})

接收参数 :$scope.initPage = function() {
if ($state.params.userId) {
$scope.msg = {
type : "5",
user_id : $state.params.userId
}
$scope.params = $state.params;
}
}

你可能感兴趣的:(angular,Js)