What is the proper way to get a rendered element by Class name?


#1

What is the proper way to get a rendered element by Class name?


#2

If you’re going to be deploying in production mode, I would suggest an alternative solution. Minimizers will rewrite class names out from under you. Please describe what you are really trying to achieve.


#3

I am trying to add pinch and zoom support to layered calendar,


#4

Have you tried using @ViewChild?


#5

@rapropos Yes I did, returns undefined…


#6

You’re probably trying to access it too early. I know ngAfterViewInit works; not sure about the Ionic lifecycle events.


#7

and if everything does not work --> create a custom directive for that element with an @Output --> if the element is rendered (OnInit-hook) --> Emit the ouput with the element it self.

So you do not have any ugly node selection