I am currently using the latest angular.beta.0 and have followed their quick start tutorial with the router tutorial.
The app works fine but upon inspecting the generated DOM, there is an <undefined>
tag generated. It isnt causing any issues but I would want it to be clarified.
The undefined tag contains the whole app markup in it.
When Routing you can skip the selector in the components, which is valid. But they will appear as undefined. That may look ugly, so you can avoid it by specifying a selector which will work as a name and won't match any custom element in your templates.
So this will produce an undefined
custom element in your DOM
// Some component loaded through routing
@Component({
// No selector!
template : 'Some template'
})
This will not
// Some component loaded through routing
@Component({
selector : 'some-component',
template : 'Some template'
})
This case will show some-component
in the DOM instead of undefined
.
I hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With