Skip to content

Tag: angular

Angular why asterisk (*)

In Angular document, * and template, we know that the *ngIf, *ngSwitch, *ngFor can be expanded to ng-template tag. My question is: I think the ngIf or ngFor without * can also be translated and expanded to template tag by Angular engine. The following code would be the same as So why bother designing a strang…

Angular 2 not updating until any object is clicked

The following is something I’m trying to get working based on the Angular Tutorial. And the View sobots.data looks to be returning the data object as expected – however it’s still not updating until I click on any button/route/any event is fired. No errors show up in the console and I’…

Angular2 : render a component without its wrapping tag

I am struggling to find a way to do this. In a parent component, the template describes a table and its thead element, but delegates rendering the tbody to another component, like this: Each myResult component renders its own tr tag, basically like so: The reason I’m not putting this directly in the par…