Scully Angular Library
The@scullyio/ng-lib package provides Angular-specific integration features that enable you to utilize the full potential of Scully’s static site generation capabilities.
Installation
When you install Scully using theng add schematics, the Angular library is automatically installed:
Module Setup
Import theScullyLibModule in your AppModule:
Configuration
TheforRoot() method accepts a configuration object with the following options:
Configuration Options
Enables the TransferState service to cache and transfer application state into the static site.
When true, the IdleMonitor service will always monitor the application, not just during Scully rendering.
Disables automatic idle detection and requires manual triggering of the ready event.
The base URI for loading Scully content during development.
Example Configuration
Core Services
The library provides the following core services:TransferStateService
Transfers application state from the server-rendered page to the client application, avoiding unnecessary API calls. Learn more about TransferStateService →IdleMonitorService
Monitors Angular’s Zone.js to detect when the application becomes idle, signaling to Scully when it’s safe to render the page. Learn more about IdleMonitorService →ScullyRoutesService
Provides access to all routes generated by Scully through observables and methods. Learn more about ScullyRoutesService →Public API
The library exports the following members:Source Code
View the source code on GitHub:Next Steps
Transfer State
Learn how to cache and transfer application state
Idle Monitor
Understand how Scully detects when to render
Route Service
Access generated routes in your application

