piątek, 26 lutego 2016

Angular 2 Component - select property... ohhh I mean selector :-)

I wondering is there a way to mark some properties of Angular2 component as required as for example selector property?

I assume that the selector property is specific for browsers, and maybe on another platform this property is not required, but as far I use bootstrap to launch my app, Angular2 know that I will lunch this in browser, so maybe a small error like, "component [xxx] dont have selector property", would be a nice thing :-)

I just spent almost one hour wondering why is my code not working, where I did very simple example based on tutorial from Angular2 website to just show one component in another component.
Below I put example of my invalid component :-) of course this will not work, but I dont get any error about this situation in console. Of course as always it was my mistake. I made a typo :-(.



I really like Angular2 but there are so many things to learn in this framework, that this kind of property checking as some additional option to switch on would be great and help a lot.


Just my thoughts, or maybe I just need to buy glasses :-)

Brak komentarzy:

Prześlij komentarz