top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In Angular(2/4/5), How to select the elements with class name ?

0 votes
311 views
In Angular(2/4/5), How to select the elements with class name ?
posted Jan 17, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

In Angular, we will typescript.Typescript is a superset of Javascript. So you can still javascript methods.

For selecting element you can use document.getElementsByClassName()

Example

var classname = document.getElementsByClassName('classname')
answer Jan 23, 2018 by Manish Tiwari
...