Generator
Usage
<pm> run generate TYPE NAME
<pm> run generate TYPE PATH/TO/NAME
typeis a string (component||view||service).pathis a target path where files will be created; the script normalizes / extracts the last word to derive thename.
Files generated
Target directory: <type>/<path>/<to>/<name>/ or <type>/<name>/ if only name was provided.
- Component class:
<name>.<type>.ts
Generator-produced components and views intentionally include the __TEMPLATE_PLACEHOLDER__ token. This is by design: this token is used on build to inject HTML templates into those files.
- HTML template:
<name>.<type>.html
A template can also be written directly inline (remove the .html file and the __TEMPLATE_PLACEHOLDER__ token). Defining both an inline template and an external .html file, or neither, fails the build.
- Stylesheet:
<name>.<type>.scss - when
i18nis on: Locale files:locales/*.json- fromconfig/languages.json'sLANGUAGES. For a view, each file is seeded with a top-leveltitlekey (used as adocument.titlefallback — see How do I create a view?); component locale files don't get one. - when
testinNutin.includeAppis on: Test files:<name>.<type>.test.js