![](/img/trans.png)
[英]Angular use multiple instances of service of parent component to child
我看過這個帖子: Using multiple instances of the same service 。 是否可以從父級到子級使用相同的多個服務實例? 例如,我在ParentComponent中有一個ElementService並且有該服務的 2 個實例 我應該如何在Child2Compone ...
[英]Angular use multiple instances of service of parent component to child
我看過這個帖子: Using multiple instances of the same service 。 是否可以從父級到子級使用相同的多個服務實例? 例如,我在ParentComponent中有一個ElementService並且有該服務的 2 個實例 我應該如何在Child2Compone ...
[英]Error: [$injector:unpr] Unknown provider: nxProvider <- nx <- adminController
我正在開發 AngularJS (v1.6) 應用程序,我收到以下錯誤。 我嘗試按照建議的鏈接進行操作( https://code.angularjs.org/1.6.5/docs/error/$injector/unpr?p0=nxProvider%20%3C-%20nx%20%3C-%20ad ...
[英]Application died in status UNMOUNTING: Cannot read property 'injector' of undefined
我正在使用 Single-Spa-Angular 庫構建微前端。 我使用“ng add single-spa-angular”創建了三個不同的子應用程序,其中兩個應用程序運行良好,但一個應用程序顯示以下錯誤: 和 誰能幫我嗎。 感謝 Shashi Bhushan Verma ...
[英]Error while importing a component to another component in angular 7
每次嘗試將一個組件導入另一個組件(它們不是同級組件)時,都會在控制台上收到此錯誤: 這是我的app.module.ts文件: 誰能幫助我知道為什么會發生此錯誤以及如何解決它。 ...
[英]AngularJS injector not able to resolve a required dependency
我正在准備使用Angular ui通知。 當我托盤安裝它時,瀏覽器告訴我“錯誤:“ [$ injector:unpr]”。問題是對我來說,依賴關系還可以。代碼: 編輯:我拉我的js文件的方式: 謝謝你的幫助! ...
[英]Difference between module dependency and service dependency in AngularJS
我不明白模塊依賴和服務依賴之間有什么區別。 例如, 我不明白為什么可以通過components.users控制器方法傳遞Users服務,因為component.users模塊不需要模塊。 (我認為api.users模塊應作為必需模塊之一以模塊方法傳遞)。 換一種說法... ...
[英]Can we configure Injector in TestBed
我正在為Angular中的自定義ErrorHandler編寫測試用例。 我在構造函數中添加了Injector的依賴關系,因為我了解到在ErrorHandler之后初始化提供程序。 如下所示: 現在,在編寫測試用例時,應該如何創建我的錯誤處理程序。 我可以將Injector添加為提供 ...
[英]Injector:modulerrr error even a after adding ngRoute. AngularJs
我很難弄清楚為什么我仍然有此錯誤: 我有我的索引: 我的script.js 到目前為止,我的家和主控制器都空着。 我想念什么? 我嘗試使用縮小版下載文件,並且我也在這里查看: 即使添加ngRoute之后,Angularjs 1.2.x Injector:m ...
[英]angularJS and Bootstrap: Error: [$injector:unpr]
我對angularJS還是Web開發領域的新手,所以這是我的問題:我試圖創建一個書店網頁,用戶在其中使用模態輸入數據,問題是何時嘗試為模態創建控制器,對於“取消”按鈕,它會給我您在標題中看到的錯誤,即: “ angular.js:14961錯誤:[$ injector:unpr]”。 ...
[英]AngularJS1.5 injector issue (MacOSX)
嘿,當我嘗試在我的代碼庫( https://github.com/CraigOldfield/AngularJSWork )上使用'gulp serve-dev'時,我收到此錯誤消息 。 重現步驟如下: 將存儲庫克隆到我的機器上(這台機器已經安裝了節點並進行了吞咽(全局)。 ...
[英]ngMaterial throwing Error: [$injector:modulerr]
我正在使用ngMateril進行自定義對話框。 但是我收到錯誤消息,錯誤為[$ injector:modulerr]。 我無法找出錯誤。 任何幫助,將不勝感激。 HTML代碼中的外部腳本 <script src="//ajax.googleapis.com/a ...
[英]angular js getting error using $stateParams
我的應用程序正常運行,但是我在控制器中添加$stateParams ,我收到此錯誤: angular.js:14791 Error: [$injector:unpr] Unknown provider: $stateParamsProvider <- $stateParams < ...
[英]How to destroy injected service in angularjs cache?
我們都知道在AngularJS service是單身人士。 從那以后當你執行$injector.get('foo')你將獲得這個服務的實例,並且它的構造函數將被調用+對象將被添加到注入器的緩存中,原因是它是單例。 無論如何,我是否可以使用任何方法來刪除緩存中的服務以重新創建服務? 無論 ...
[英]Visual Studio's AngularJS Template Explained
當我使用VS2015模板創建一個新控制器時,我得到以下代碼: 問題: 為什么VS模板將代碼包裝在自調用函數中? activate()函數有什么用? 我想在里面編寫什么代碼,為什么我需要一個單獨的函數而不是只是在控制器中編寫代碼? 做controller.$in ...
[英]Error No provider for NgZone
我有一個使用Angular Google Maps顯示位置的應用程序。 一開始我能夠顯示地圖,但是一段時間以來(可能我已經修改了一些東西),我得到了以下錯誤: 我的代碼是:app.module.ts: mycomponent.html 我將衷心感謝您的幫助! ...
[英]Karma Error: [$injector:modulerr] Failed to instantiate module due to: (Index.html is working perfectly)
因此,我在webstorm中設置了一個angular js項目,除業力測試套件外,其他所有功能均正常運行 我正在建立模型,如下所示: 我的測試是: 工作並通過,但是 不僅未通過測試,而且突然我的模塊不再加載:S 錯誤:[$ injector:moduler ...
[英]Error: $injector:modulerr Module Error using separate .js files
看着我的腦海中所有其他答案。 我的“ app.js”: 我的另一個.js文件具有配置和兩個控制器: 在我的_Layout中: 我在_Layout主體中初始化ng-app,然后在View的div中初始化。 'ng-controller =“ imageCtrlCon ...
[英]how to use Angular2 ngrx storemodule reducer (initialState) inject service?
如何保養注射減速器? 在減速機中如何使用服務? 沒有構造函數,沒有類! ...
[英]Error on heroku deployment in Rails + Angular. ui-router
Rails后端。 角形前端。 使用angular-ui-router。 在本地,它工作正常。 但是,當將其部署在heroku上時,會出現此錯誤。 所有依賴項似乎都已正確下載。 我需要幫助,以查看此錯誤指示。 application.js中: 控制台上的錯誤消息: ...
[英]Why does Angular let you inject the $provide service into config blocks?
根據Angular文檔,我們只能在配置塊中注入Providers(而不是實例)。 https://docs.angularjs.org/guide/module#module-loading-dependencies 但與此相反,Angular允許您注入$provide或$inject ...