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