angularJS界面跳转,及传参

来源:互联网 发布:webpack配置config.js 编辑:程序博客网 时间:2024/06/03 18:45

demo如下:

<!doctype html><html>    <head>        <meta charset="utf-8">        <title>form demo</title>        <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />        <script src="js/angular.min.1.6.0.js"></script>    </head>    <body ng-app="app" ng-controller="myctrl">        <button ng-click="jump()">点击跳转下一页</button>        <br /><br />        <a ng-href="a.html?#name=xie&age=25&gender=nv">点击跳转下一页</a>        </div>    </body>    <script>        var app = angular.module('app', []);        app.controller('myctrl', function($scope, $window) {            $scope.jump = function() {                $window.location.href = 'a.html?#name=xie&age=25&gender=nv';            }        });    </script></html>
0 0
原创粉丝点击