How do i get the State in any custom widget ? its available only on the html like : {{state}} but does not available onInit

i have a date range example

i would like to get the state on Init (that comes from routing for instance)
lets say i would like to get the this.state.start
it will be available only if i will print it in the html . onInit it will be “infinty”

so the main question is how to get the current state on the code . i tried ngAfterviewInit also

thanks

Hi @yosef.ono

I may not be following the question well (I’m not strong in Angular), but every custom widget should have all of it’s state information stored in this.state. Perhaps this could be helpful to you?

@chuck.meyer thanks

The issue is that the state exposes for me only on the html.

Let say I have something in the routing .here .
price=1:5 (range) like in the example

If I will print the this.state.start it will print it as well
But onInit it will print the default value
So the state still did not initilze

Let’s sY o have a date that I would like to fill with data when I come back to the page .

I need this data on init but I cant find it in this.state

As I said only on the html . Probably after everything is up and ready or smth