AngularJS - 如何关闭hashbang模式

JQu*_*ile 4 angularjs

我有一个网页上有两个AngularJS应用程序.因为有两个应用程序,我必须将应用程序引导到页面上.我正在引导这样的应用程序:

// Bootstrap the first app
var app1 = angular.module('app-1', []);
app1.controller('App1Controller', ['$scope', '$window', function ($scope, $window) {
}]);
angular.bootstrap($('#app1'), ['app-1']);

// Bootstrap the second app
angular.bootstrap($('#app-2'), ['my-app-name']);
Run Code Online (Sandbox Code Playgroud)

我的问题是,如何完全关闭hashbang?我没有使用AngularJS进行视图管理.我正在将它用于其他事情.出于某种原因,当我使用带有Angular的IE8访问页面时,用户被重定向到其中包含hashbang的页面.hashbang导致服务器端错误.出于这个原因,我需要关闭它.我怎么做?

Ale*_*tis 5

你可以打开角度html5推送状态,它应该擦除任何哈希刘海:

app1.config(['$locationProvider', function($locationProvider) {
     $locationProvider.html5Mode(true);
}]);
Run Code Online (Sandbox Code Playgroud)