What is Angular DSL?

Posted by Jessica Taylor | Updated on

A domain-specific language (DSL) is a computer language specialized to a particular application domain. Angular has its own Domain Specific Language (DSL) which allows us to write Angular specific html-like syntax on top of normal html. It has its own compiler that compiles this syntax to html that the browser can understand. This DSL is defined in NgModules such as animations, forms, and routing and navigation.

Basically you will see 3 main syntax in Angular DSL.

  1. (): Used for Output and DOM events.
  2. []: Used for Input and specific DOM element attributes.
  3. *: Structural directives(*ngFor or *ngIf) will affect/change the DOM structure.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers