Hi,
Need some help.
Have a webix jet project with a route top/coolstuff that renders a view.
If I go to this route by entering the route in the url (not by clicking a button etc from another view) the init() renders everything from config.
I want to instead of rendering config for top/coolstuff to reroute the user to top/otherstuff instead yet keep the config intact as some users are allowed to the /coolstuff, and some should be redirected to /otherstuff.
Think I have the if-statment done but am unable to reroute some users to /otherstuff.
Have tried the
this.show(‘otherstuff’);
however, if I go to /coolstuff I see the /coolstuff view and then when hitting refresh F5 I am redirected to /otherstuff. I want to be redirected directly based on an if condition.
How can I do this best without changing the config?
My ideas were:
Call init(){ if something then init {coolstuff}} else reroute to /otherstuff
if something, return original config to init , otherwise reroute in config to /otherstuff
Not sure how to do this.
First time writer here so excuse the way I’m formatting the question.