如何通过angularjs跳转其他页面?

时间:2016-09-18 08:23:54

标签: angularjs

我将使用angularjs完整页面跳转。

我有两页:

1:bootstrap.html

2:config.html

当我点击按钮时,我希望页面从bootstrap.html跳转到config.html

我的bootstrap.html就像这样

 <script type="text/javascript">
  var app = angular.module('myApp',[]);
  app.controller('myContr',function($scope,$location){

    $scope.selectAll = function(){
       $scope.mySelect = !$scope.mySelect;
    }

    $scope.ngNext = function(path){
      $location.path(path);
    /*  console.log(path);
      var curUrl = $location.absUrl();
      console.log(curUrl);*/

    }

  });

 <button class="btn btn-success" type="button" ng-click="ngNext('config.html')">next</button>

当我点击按钮时,网址为:http://localhost/angularjs/bootstrap.html#/config.html,但我希望如下:http://localhost/angularjs/config.html,Who可以帮助我,谢谢

0 个答案:

没有答案