我目前正在使用laravel js在laravel中创建一个项目。如果我尝试在开发模式下构建它,那就好了。但是如果我们在生产环境中构建应用程序,我会出错。
我已经尝试过
Angular in Rails throws an error in production `Error: [$injector:unpr] Unknown provider: e`
这给我一个错误
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.config due to:
Error: [$injector:unpr] Unknown provider: NotificationConfig
这是我的代码
import {RoutesConfig} from './config/routes.config';
import {NotificationConfig} from './config/notification.config';
import {LocalstorageConfig} from './config/localstorage.config';
angular.module('app.config')
.config(NotificationConfig)
.config(RoutesConfig)
.config(LocalstorageConfig)
.config(['$httpProvider', function ($httpProvider) {
$httpProvider.interceptors.push('httpErrorsInterceptor');
}])