Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-1746

...

Defining an app or subapp as a component

Info
titleBest practice
Multiexcerpt
MultiExcerptNameDefine as a component anything that is likely to change

Defining something as a component allows other developers quickly change the implementation. For this reason, you should define anything that is likely to be changed or customized later as a component. For example, define your apps and subapps as components. Views are also common customization points so define the views returned by subapps as components. Any components you define are available for injection. This is also true for components further up the hierarchy in parent components.

In the module descriptor file, add a section for each component. Name the components using the following convention:

...

When the user clicks one of the buttons, a new location is requested. The AppController will take care of redirecting it to the hello world app and launching the greeter subApp.

Todo

Diagram showing how SubApp, View interface and View implementation interact.

A simple interface providing a method to set the name.

...