Ionic 2 malformed HTML breaks components / shows white page


#1

I’m running the “tutorial” v2 project starter created with:

$ ionic start MyIonic2Project tutorial --v2

If I place an erroneous </p> tag after another </p> tag in a Page component, for example hello-ionic.html, this “breaks” the component (no longer functions properly with the nav stack and shows up as an empty white page)

Working valid HTML

Erroneous </p> tag kills everything

This behavior happens with other malformed HTML as well. For example, a non-closed <sup> tag does the same thing.

Is anyone else experiencing this? If so, this seems like an unfortunate pitfall of the platform. In a HTML / template heavy application, there are bound to be a few cases of malformed HTML. Browsers are OK with this (you may get a whole page of superscript when you don’t properly terminate </sup> but the page still works. Showing a white page doesn’t give any indication of where the bad HTML lives.


#2

Do you not see any template parsing errors in your JavaScript console?


#3

@rapropos, nothing identifiable in the Browser console or Terminal on the build

Terminal on build (no errors)

Log with valid HTML

Log with missing </sup> tag on the superscript


#4

Hmm. Maybe it’s the same problem we ran into in this thread. Try telling your debugger to break on caught exceptions (not a perfect solution, but might at least help you see the errors).

Perhaps somebody official will chime in on whether NavController.loadPage is doing what it’s supposed to WRT template parsing errors.