@H_4030@具体写法举例:
@H403_0@
1.js定义一个controller
<div class="jb51code">
<pre class="brush:js;">
function MyCtrl($scope,$location) {
$scope.jumpToUrl = function(path) {
//TODO:add code here
};
}
@H_4030@具体写法举例:
$scope.jumpToUrl = function(path) {
//TODO:add code here
};
}
<button ng-click="jumpToUrl('/signin')">signin
$location.path(path);
后面再加上一句