0
我現在嘗試了離子,發現了一些奇怪的行爲。aot-compilation breaks NumberPipe
當我使用ionic serve
開始我的應用程序時,一切都完美無瑕。 一次,我已經捆綁使用ionic build browser
它只要NumberPipe
調用崩潰的應用程序:
<span>{{sizeVertical | number:'.2-2'}}</span>
使得它與崩潰:
main.js:3646 TypeError: Cannot convert undefined or null to object
at new NumberFormat (native)
at Function.t.format (file:///.../build/main.js:9:9621)
at Te (file:///.../build/main.js:1:22885)
at t.transform (file:///.../build/main.js:9:12974)
at file:///.../www/build/main.js:1:9214
at e.detectChangesInternal (file:///.../build/main.js:33:31019)
(...)
沒有管一切都很好。
我很確定這與我完全不熟悉的AoT編譯有關。
我該如何解決這個問題?任何提示將不勝感激!
你確定你的管道是正確的嗎? number:'。2-2' – LeRoy
是的,它是'。 - ' –
j2L4e