Angular Static
A simple way to build static templates with Angular
Status: Infancy
What is Angular Static?
- Server based - Build Angular templates on the server. An alternative for server templating (pug, twig, ejs).
- Static - No JavaScript from Angular is included.
- Uni-directional - Follow a simple props down approach to render your site
- Simple templates -
NgModules
are not required. You can provide an Angular template and Angular Static will create the whole page.
Example usage
;;
AppModule
Creating an Angular Static takes a "top-down" approach for passing in data. This is similar to state management in React. Create a top-level Component
that injects a STATIC_CONTEXT
token. This STATIC_CONTEXT
token represents the data passed into your template function. Then include the top-level Component
in an NgModule
.
// app.module.ts;;;; ;
Creating a template
;