Debugging Angular2 Applications

I have a written example of an angular2 component in which the initial closing tag for the "h2" element in the template was not

@Component({
selector:'rx2',
template: `
<div><h2> RX2 component</h2></div>
`
})

And when running the application in the browser, only below the error description was displayed in the console.

directive_normalizer.js: 106Uncaught Error: template parsing errors: (...)

Since this is a small component with 1 line for the template, I was able to identify the problem and fix it, to my question, is there an easier way to identify such problems in the case of large templates.

+4
source share
1 answer

You can use the following technique

Step 1 . Click(...)

enter image description here

Step 2 - find the error

enter image description here

+6
source

Source: https://habr.com/ru/post/1659964/


All Articles