scullyio / scully

The Static Site Generator for Angular apps
https://scully.io/
MIT License
2.55k stars 256 forks source link

[BUG] npm run scully, <scully-content> not found when inside ngIf #226

Closed jasper-jool closed 4 years ago

jasper-jool commented 4 years ago

Running the scully command gives an error (missing "" or "httpClientModule") when the scully-content tag is inside an element with an *ngIf.

For example:

<button (click)="showDetails()">Show Details</button>
<ng-container *ngIf="details">
   <scully-content></scully-content>
</ng-container>

I can imagine people hiding the scully content at first and showing it after some user interaction.

SanderElias commented 4 years ago

@jasper-jool This is not possible with a static page. If you want to hide the Scully-content you need to do it with CSS, or some class. Being a static site means the page is active before JS starts up. The <scully-content> tag needs to be on the page when it is rendered.

@Villanuevand Perhaps we should mention this is the documentation? I'm going to close this issue because there is nothing we can act upon.