cost 364 ms
是否可以在沒有顯式導入的情況下從 Angular 中的共享模塊繼承基 class

[英]Is it possible to inherit base class from shared module in Angular without explicit import

在我的項目中有許多“基礎”組件類。 此外,該項目將分為幾個其他模塊,其中我只是想將共享模塊用作基類源。 我希望可以在 app.module 中只使用一個簡單的import { SharedModule } app.module ,並避免在組件后代中導入許多基組件類,但錯誤發生了。 (我已經編輯了 ...

如何根據 angular 中的排序順序顯示已排序表的箭頭?

[英]How can I show the arrows of my sorted table according to my sort order in angular?

我有一個表格,我按從大到小或字母順序排序。 這是我正在排序的部分的 html **這是我在 typescript 部分中的 function ** 我的問題是,當我按“否”排序時,“ID”中的箭頭會移動。 我該如何解決這個問題? 當我點擊“否”時,我只想讓那里的箭頭上下移動 footnote:這 ...

將 angular/fire 7.5 與 angular 15 集成時,出現錯誤 Need to provide options, when not being deployed to hosting via source

[英]When integrating angular/fire 7.5 with angular 15, get error Need to provide options, when not being deployed to hosting via source

我正在將一個應用程序從具有 angular/fire 5.4 的 angular8 移植到具有 angular/fire 7.5 的 angular15。 我將以下內容添加到我的 AppModule 導入部分 但我收到此錯誤消息:我錯過了什么? ...

Angular 15+ 當結構指令用作 hostDirective 時沒有 TemplateRef 的提供者

[英]Angular 15+ No provider for TemplateRef when structural directive used as hostDirective

自 angular 版本 15 以來,有可能將獨立指令綁定到組件和指令裝飾器。有沒有辦法將結構指令(注入 templateRef)用作 hostDirective? 這將非常有用,但無論如何我都嘗試過,但我總是找不到 TemplateRef 的提供者。 stackblitz 玩 ...

在 angular 15 項目的 src 文件夾外進行業力測試

[英]Having karma tests outside src folder in angular 15 project

我在項目根級別的測試文件夾中的 src 文件夾外有業力測試規范文件。 將 angular 從 14 更新到 15 后,karma 需要測試規范文件位於 sourceRoot 在 angular.json 文件中指定的任何文件夾中。 有沒有辦法告訴 karma 在不更改 angular.json 中的 ...

Angular 材料 15 matInput 類型 datetime-local 缺少本地日期時間選擇器

[英]Angular material 15 matInput type datetime-local is missing native datetime picker

我在mat-form-field中使用類型為"datetime-local"的input字段(帶有mat-input ),直到 Angular 14 有一個用於本機日期時間選擇器的按鈕。 但是自從我升級到 Angular 15 並進行了 Material MDC 遷移后,這個按鈕就不見了,而且找不到 ...

如何在 Angular 15 的條件下禁用反應式表單中的輸入 FormControl?

[英]How to disable an input FormControl in a Reactive Form with a condition in Angular 15?

我有一個可以輸入學生 ID 的表格。 下面是兩個輸入框,全名和email。當我加載頁面時,應該只啟用學生ID輸入框,而禁用下面的兩個輸入框。 當我輸入學號時,如果有記錄,那是唯一一次啟用全名和email的輸入框。 當我使用 Angular 13 時,它能夠為每個輸入使用它 但是,我最近更新到 An ...

如何對 mongodb 中的數百萬條記錄進行有效的分頁過濾?

[英]How to filter with pagination efficiently with millions of records in mongodb?

我知道關於這個主題有很多問題。 雖然大多數工作正常,但當有數百萬條記錄時,它們的性能確實很差。 我有一個包含 10,000,000 條記錄的集合。 起初我使用的是 mongoose paginator v2,每頁大約需要 8 秒,沒有過濾,過濾時需要 25 秒。 與我在谷歌搜索中發現的其他答案相比 ...

Angular 材料 15 styles 用於遺留組件

[英]Angular Material 15 styles for legacy components

升級到 Angular 后 15 我想使用遺留組件以便之后進行持續遷移。 然而,遺留組件沒有全部 styles 並且看起來格式錯誤。 我使用ng update進行從 Angular 14 到 15 的遷移,並調整主題以使用文檔中提到的新方法( https://material.angular.io/ ...

Typescript Angular 15 更新后的目標警告

[英]Typescript target warnings after Angular 15 update

我將我的 angular 應用程序更新為 Angular 15。它構建正常 - 除非出現如下警告: TypeScript Angular CLI 將編譯器選項“target”和“useDefineForClassFields”分別設置為“ES2022”和“false”。 我的tsconfig.js ...

錯誤 NG8002:無法綁定到“matDatepicker”,因為它不是“輸入”的已知屬性

[英]error NG8002: Can't bind to 'matDatepicker' since it isn't a known property of 'input'

我正在使用 Angular 15 實現一個應用程序。我在那里使用 Angular 材料。 我需要添加一個日期選擇器,在插入下面的代碼片段后出現錯誤。 錯誤: 如果您需要更多信息來解決我的問題,請在此處發表評論。 ...

更新后自定義排版在 angular 材料 15 中不起作用

[英]custom Typography not working in angular material 15 after update

此代碼非常適合使用 angular 14 在我的整個應用程序中自定義我的排版 將 Angular Material & cdk 更新為 15 時,此錯誤不斷發生: 試過ng generate @angular/material:mdc-migration但它沒有特別檢測到該文件中的任何問題。 ...

如何在 Angular 中的生產構建期間設置 API 路徑 15

[英]How to set API path during production build in Angular 15

在 Angular 15 中,沒有環境文件,因此我們使用 proxy.config 文件為本地開發設置 api 路徑,但這在生產構建中不起作用。 下面是 proxy.config.json 文件。 這是我的 package.json 文件。 有人建議使用動態 api 路徑設置進行生產構建嗎? ...

Angular 材料 15 MatSort 始終未定義

[英]Angular Material 15 MatSort always undefined

我有一個應用程序,過去 2 年一直在表格中使用 MatSort。 上周我更新到版本 15,現在我發現我的 MatSort 在 AfterViewInit 事件中總是未定義。 我已經確認 MatSortModule 是導入的,所以我不確定為什么它現在壞了。 任何幫助表示贊賞。 下面是我的代碼片段,顯示 ...

Angular 15:每次值變化時調用 function

[英]Angular 15: call a function every time a value changes

我們的教授要求我們使用以下組件構建一個簡單的電子商務應用程序:客戶、訂單、菜單(導航欄)和購物車。 我們需要根據從導航欄的下拉菜單中選擇的所選客戶在前端顯示訂單,如圖所示: 一旦我們 select 一個客戶,它的 Id 就被分配給一個變量,然后它被用來根據客戶 id 加載訂單(多虧了一個名為 g ...

NgOptimizedImage 警告

[英]NgOptimizedImage warning

我正在嘗試新的 angular 15 功能來提高圖像性能,但我遇到了這個警告。 ` 基本上原始圖像太寬了,我使用高度和寬度屬性使它相對於它的尺寸來說太小了,實際上通過增加高度和寬度警告消失了。 但是我想要那個尺寸的圖像,有辦法刪除那個警告嗎? ...

當我用 chrome debbuger 吃午飯時,我的斷點不可見

[英]When I lunch chrome debbuger my breakpoints are not visible

IDE 視覺工作室代碼 tsconfig.json angular.json 啟動.json sourcemap:是的,標准的 chrome 配置,各種各樣的東西,還有點是無法到達的。 我想在啟動 chrome 斷點之前調試我的代碼,斷點是紅色的,但在啟動之后它們是灰色的。 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM