AngularApp
The AngularApp is the root element of the Angular model. Everything else in the frontend model belongs to it.
Project Structure
Your frontend is defined in an angularProjects model. The root thereof, an AngularApp is the first thing to
describe.
Under your project there needs to be a angular directory, this directory contains everything related to the Angular metamodel and expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact..
The angularApps directory can contain one or more directories, each for a different AngularApp. It is possible to have more than one AngularApp, but usually one per project works best.
Under the model directory you can add the AngularApp XML file.
- While the name of
Applicationsis typically camelCase, anAngularApphas a kebab-case name. - The value of the attribute
prefixshould also be kebab-case.
project
├── conf
├── applications
├── angular
. ├── angularApps
. ├── space-app
. ├── model
. └── space-app.xml
- space-app.xml
- expansionSettings.xml
<angularApp name="space-app">
<version>1.0.0</version>
<prefix>nsx</prefix>
</angularApp>
<expansions>
<expansion>
<type component="angularProjects" name="AngularApp"/>
<target>space-app</target> <!-- AngularApp name -->
<profile name="Std API yarn"/> <!-- Different profiles are also possible -->
</expansion>
</expansions>
prefix attribute is used to set a prefix in the angular.json and will be used by the Angular CLI to prepend created selectors.
Options
Several options can be set on the AngularApp. They are documented on the page of the feature they configure:
- authentication (
angular.basicAuth.enable,angular.oidcAuth.enable): see Authentication; - the default language (
angular.defaultLanguage): see Translations; - branding, header and layout overrides (
angular.hasCustomBranding,angular.hasCustomHeaderContent,angular.customization.hasCustomLayout): see Default Overrides.