Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
23 stars 12 forks source link

Implement directives `appShellRender` and `appShellNoRender` #461

Closed tschaffter closed 2 years ago

tschaffter commented 2 years ago

I started using the directive *appShellNoRender to conditionally render sections of the Home page when using SSR. I followed the instructions given in Read Angular Universal: a Complete Practical Guide. However, I forgot to implement these directives:

tschaffter commented 2 years ago

These directives will be used in many pages/libraries. Let's create a shared util library and add them to it!

nx g @nrwl/angular:lib util --directory=shared

Update the library to meet the standard of this monorepo:

Let's create the directives:

nx g @nrwl/angular:directive directives/app-shell-render --project shared-util
nx g @nrwl/angular:directive directives/app-shell-no-render --project shared-util