Angular version: 13.1.3
- Angular Universal (server side rendering)
- i18n (Multi languages)
- Cache http requests state (server state to client state)
- Cookies
- Dotenv environments setup
- registerLocaleData (pt)
- ESLint
- Prettier
- Create a
.envfile in project root; - Use
.env.EXAMPLEas example; - Exec
npm run configcommand to generate TS environment file;
- There are two preconfigured languages,
pt-branden-us; - You can add more creating
.jsonfiles with language short name inassets/i18n/; - To change language in runtime, use
LanguageServiceto do this; - Read docs
- Persist data with cookie (Good to use in SSR, for auth, for example);
- Use
CookiesServiceto manage cookies; - Read docs
- All success http requests are cached and transferred to client app (to avoid double requests);
- You can make changes in
BrowserStateInterceptorto improve cache method;
- Exec
npm run prettierto format files; - Read docs
- Exec
npm run lintto analyze files; - Read docs
- Exec
npm run startto run dev server; - Exec
npm run start:ssrto run dev SSR server;
- Exec
npm run buildto build client app only; - Browser dist files are in
dist/my-app/browser;
- Exec
npm run build:ssrto build client and server; - Browser dist files are in
dist/my-app/browser; - Server dist files are in
dist/my-app/server;