How UI frameworks/libraries parse code in HTML tags

  angular, javascript, reactjs, svelte

I’m curious to know how frameworks such as Angular convert text in the markup to JavaScript. For example:


<div *ngFor="let product of products">

    <a [title]=" + ' details'">
      {{ }}


How is the above processed so + ' details' is converted to JavaScript code, considering that in the above code is coded as a string.
In a sense, I’m wondering how an HTML attribute value is parsed and converted to JavaScript code.
This question is not just about Angular but more of a general question as how JavaScript libraries/frameworks process the embedded code in HTML tags?

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.