0
我需要在路由中使用$ location.path(),但在嘗試注入時會獲取「未知提供者:$ location」。
我在做什麼錯? 由於
myApp.config(['$routeProvider', '$locationProvider', '$httpProvider','$location', function ($routeProvider, $locationProvider, $httpProvider,$location) {
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:unpr] Unknown provider: $location