DEV Community

loading...

Discussion on: DOM elements with ID's are global variables

ashleyjsheridan profile image
Ashley Sheridan

Not really. In standard HTML, id attributes are made into global variables. In angular, component-scoped variables in the typescript/JavaScript are made available to the template HTML via template directives. They're two completely different things.