Browsed by
Tag: Angular

Add Jasmine unit testing support to Angular in StackBlitz

Add Jasmine unit testing support to Angular in StackBlitz

I mentioned StackBlitz in the post about online code editors. This service allows for creating i.a. running Angular applications. Once I wanted to execute unit tests written in Jasmine inside it, and I hit a lot of troubles. Finally, I managed to resolve them all.

Read More Read More

Duplicated ng-content and *ngTemplateOutlet

Duplicated ng-content and *ngTemplateOutlet

Recently (Angular component with varying appearance) I wrote how to use the same <ng-content> twice in a switch case.

Today I hit upon explanation of this fact in a GitHub issue (https://github.com/angular/angular/issues/22972) and I found another problem.

Namely, it is not possible to display at the same time twice the same <ng-content> even if it is packed inside a <ng-template>. Therefore the following example will not work:

Read More Read More