Closed tschaffter closed 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:
.eslintrc.json
.
"plugin:jest/recommended"
to the extends
property.sage
as the prefix.project.json
.
sage
.tags
and implicitDependencies
.
"tags": [
"type:util",
"scope:shared"
],
"implicitDependencies": []
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
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: