1
我正在尋找使用$ locationProvider api在我的項目中更改爲html5mode。我如何將它注入指令?這是我現在有:
angular
.module('myApp')
.directive('errorModal', ['$location', ,
function($location, $locationProvider) {
//to expose locationProvider to the window
window.provider = $locationProvider;
}
但是,這給了locationProvider是未定義的。這裏適當的語法是什麼?