[英]errors when running npm install -g @angular/cli
如何解決問題,請幫忙。 (is that about very slow internet connection if that was the case than what's the min requirement?) C:\Windows\system32> node -v v12.1 ...
[英]errors when running npm install -g @angular/cli
如何解決問題,請幫忙。 (is that about very slow internet connection if that was the case than what's the min requirement?) C:\Windows\system32> node -v v12.1 ...
[英]Why do we ever need to set "--aot false" in angular prod build?
我知道“ ahead of time compilation ”在構建時提供編譯。 --aot還有許多其他優點,例如 應用程序是預編譯的,所以沒有這樣的等待模板 綁定錯誤將在構建時等已知。 但是,還有一個選項可以將--aot設置為 false(對於 prod 構建也是如此)。 為什么我們 ...
[英]Get all the data of the table using jspdf and autotable
我想從我的表中獲取所有數據,問題是我只獲取了第一頁中的數據(因為分頁)。 我的桌子上有 200 個寄存器,但分頁只顯示了 100 個寄存器,我怎么能得到其他 100 個寄存器,它們在下一頁與 JSPDF 中並用 200 個寄存器生成 PDF。 我的代碼如下: ...
[英]What are the options set by default when we run ng build --prod
當我使用ng build --prod構建我的 angular 應用程序時,它會為生產環境創建一個構建優化、tree-shaking 等構建。如果我想為開發環境進行相同類型的構建,需要傳遞哪些選項ng build命令? 例如。, 基本上,要使開發構建與生產構建完全相似(配置除外),應該通過哪些 ...
[英]Angular 7 Service Returns Undefined from restful API
我正在嘗試從 Angular 服務返回任務列表,該服務從寧靜的 .NET API 獲取數據。 API 返回正確的數據,但是當 console.log 訂閱 function 的結果時,它只是未定義。 請幫忙! 這是正常運行的 API 方法:TaskController.cs 我有兩個名為 tas ...
[英]Angular 7: How to use fileReplacement globaly
我正在使用 Angular 7,我想知道是否存在任何替換文件的方法,無論使用 fileReplacement 的環境如何。 像這樣:現在的問題是我們正在使用標准方法,並且我們正在強制在每個環境中復制替換的文件。 有沒有更好的方法呢? 謝謝! ...
[英]How to read port and host from environment.ts variable for angular.json configuration
有什么方法可以讀取來自environment.ts文件的帖子編號和主機名並運行ng serve命令。 我的要求是為Dev,QA和Prod環境使用不同的端口和主機。 現在我手動在angular.json文件中更改它 “ serve”:{“ builder”:“ @ angular-d ...
[英]Build error when attempting to use cesium with Angular CLI (v7)
我剛剛開始使用angular-cesium並且正在按照他們的入門指南進行角度CLI的設置。 嘗試為我的應用程序提供服務時,遇到以下錯誤: 銫的index.js文件的內容為: 根據我得到的錯誤,我看不到函數外還有return 。 這里可能發生什么情況來解釋此錯誤的原因? ...
[英]cannot find module in angular Lazy Loading
我在 Mac 環境下成功創建了一個 angular 項目 現在我在 ubuntu 18.04 上使用設置運行相同的代碼 但是在嘗試延遲加載另一個模塊時出現了一個非常奇怪的問題,我不斷收到此錯誤錯誤:找不到模塊“app/website/site.module” 這是我的項目結構 和 ap ...
[英]Angular change detection not detecting changes only in prod
我遇到了一個奇怪的問題,希望對我來說這只是一個簡單的解決方法。 Angular中的更改檢測僅在生產中不起作用。 我使用Angular 7和ngrx作為狀態管理構建了一個相當復雜的應用程序。 根據路由,有2個主要模塊是延遲加載的。 更改檢測策略為OnPush,應用程序的99%遵循一種模 ...
[英]'ng' is not recognized as the name of a cmdlet
我安裝了新版本的nodejs。 我可以在我的機器上全局更新 angular/cli。 但是仍然無法將 ng 識別為 cmdlet 的名稱。 有什么方法可以在 Visual Studio 代碼和命令提示符中檢查 ng 版本。 ...
[英]Error building .js files with ng build on lib
我有一個要轉換為使用角度cli(v7)的應用程序。 該應用程序處於正常工作狀態。 該應用程序包含2個站點和一個公共庫: 我正在使用ng build來構建和打包UI-lib,但在FESM2015階段存在指向public_api.ts的錯誤: public_api.ts: ...
[英]Angular project with external lib doesn't compile in AOT mode using angular-cli
我開始了一個新的新項目,該項目由angular-cli 8.1.2生成。 我想為幾個微服務(應用程序)提供一個共享庫。 該庫不應包含在應用程序文件夾中,它是一個不同的項目,具有自己的git。 如果嘗試這樣做,則該應用程序不會在aot /生產模式下進行編譯,但會在jit中運行。 我想要 ...
[英]How to deploy pwa app developed in angular-cli v7 on the top of the existing website?
我已經使用 angular CLI v7 為我現有的網站開發了一個 PWA 應用程序。 我想將它部署在我現有網站的頂部。 我想要桌面用戶的現有網站,但對於移動用戶,它應該打開 PWA 應用程序。 如何在沒有任何 URL 重定向的情況下實現這一目標? ...
[英]Generate module with component and routing in Angular 8 (using angular cli command)
我使用 angular cli 命令ng new my-app創建了新的 angular 項目然后,我想在src/app目錄中創建名為landing-page 的模塊,所以我使用命令ng gm shipping-page --routing=true創建兩個文件,即一個模塊和一個其路由文件,如下所 ...
[英]angular/cli v.7 uninstall hangs out
我正在嘗試使用以下命令在全局范圍內卸載angular / cli,但它似乎不起作用。 它在/ loadDep:upath: sill install loadAllDepsIntoIdealTree上掛出/ loadDep:upath: sill install loadAllDepsI ...
[英]Repository is not clean
將 angular 7 更新為 angular 8,我使用命令$ ng update @angular/cli@v8 @angular/core@v8成功更新到angular/cli angular/core 。 而且我也使用了角度材料,所以我想更新材料,然后我用$ ng update @angul ...
[英]Property 'click' does not exist on type 'DebugElement'
我剛開始了解Karma和Jasmine。 我被困在無法對組件執行單元測試的位置,我要觸發的功能是通過按鈕的*ngIf條件綁定某些特定值。 my.component.ts headComponent.html X-service.ts my.component.sp ...
[英]ng upgrade command fails for upgrading cli from v7 to v8
用於將cli版本從v7項目更新到v8的ng upgrade命令失敗。 手動嘗試首先升級cli也會失敗。 您的全局Angular CLI版本(8.0.1)大於本地版本(7.3.9)。 使用本地Angular CLI版本。 包"@angular/compiler-cli" ...
[英]How to build bundle.js with angular 8?
有人可以幫助我嗎? 如何只用角度8構建一個bundle.js? 當我執行“ npm run build”時,創建了許多JavaScript文件。 (例如main.js / runtime.js / polyfills.js / ...) 我希望所有這些(main.js / run ...