我試圖在角度2模板(aka視圖)中大寫一個字符串的單詞,但在控制檯中出現以下錯誤,應用程序不加載(顯示空白頁): Error: Uncaught (in promise): Error: Template parse errors: The pipe 'capitalize' could not be found 我正在嘗試以下操作。以下示例使用文字字符串進行說明。實際上,字符串將是角2分量中的變
我有以下模板: <div *ngFor="let item of myArray | customPipe1 | customPipe2; let l = length">
Here is the length of my ngFor : {{l}}
</div>
不幸的是長度不ngFor存在。我該如何解決這個問題,以便在我的ngFor中有長度可用?