如何使用angularjs搜索参数而不使用哈希?

时间:2014-11-01 10:10:05

标签: angularjs

如何在没有哈希标志的情况下将$location服务用于搜索参数?

1 个答案:

答案 0 :(得分:0)

这在AngularJS文档中称为HTML5模式。打开它:

angular
  .module('myApp',[])
  .config(function($locationProvider) {
      $locationProvider.html5Mode(true);
  });