View guides

Choose and learn AngularTS HTML templates or type-safe component views, which share the same module and component lifecycle.

A view is the DOM output of a component or directive. AngularTS offers two authoring styles:

  • HTML templates keep static structure in markup and use directives for behavior.
  • Programmatic views construct DOM in TypeScript and type-check controller-to-view bindings.

Read how to choose. Both styles register on normal modules. A server-rendered module can use HTML while a client-owned dashboard module uses typed programmatic views in the same application.


HTML template views

Render a component with readable HTML, interpolation, directives, controller methods, and explicit bindings.

Type-safe component views

Construct component DOM in TypeScript with typed tags, properties, events, controller access, and reactive reader functions.

Reactive collections and cleanup

Render keyed reactive collections, preserve DOM identity, and release resources with the owning view.

Choose a view style

Decide between HTML templates and typed component views using team, type-safety, DOM, and maintenance requirements.