2 ms·
Both Angular and React rely on an AST - React uses jsdom, while Angular has a template compiler which constructs an AST from the template, and the renderer then
by Bahamut 10y ago
Both Angular and React rely on an AST - React uses jsdom, while Angular has a template compiler which constructs an AST from the template, and the renderer then can render from the AST as it determines. Angular can render templates with the inert template tag - this allows it to leverage browser caching for browsers supporting the template tag.
It also supports the shadow DOM through its style engine with the component decorator. One can either use native shadow DOM (and use a polyfill for the functionality), or use Angular 2's built-in virtual shadow DOM where it randomly generates unique attributes to style off of with the component decorator.