2

I am using scully as pre-render for Angular web site.

Here is the scully config present at the root of the site:

import { ScullyConfig } from '@scullyio/scully';

/** this loads the default render plugin, remove when switching to something else. */

export const config: ScullyConfig = {
  projectRoot: './src',
  projectName: 'MyProject',
  spsModulePath: 'YOUR OWN MODULE PATH HERE',
  outDir: './dist/static',
  routes: {
  }
};

I am able to pre render the Angular project by running the following commands:

ng build
npm run scully
npm run scully:serve

My goal is to hide a piece of html while pre-rendering the page:

<div class="nav" *ngIf="isGuest">
  <a href="#" class="btn" routerLink="/create-user">Create User</a>
  <a href="#" class="btn" routerLink="/login">Login</a>
</div>

I want the above piece of content to be only rendered and parsed while I am viewing it from the browser. I don't want the html to be parsed via Angular logic during pre-rendering. I just want that content to be hidden during pre-rendering and only to be parsed by Angular while the browser is running.

0 Answers0