avatar image
Former Member

how delete route in app with routing

hi, Someone could help me how to delete routes, i'm trying with this code:

i'm using destro() method in route but no workin

var oRouter;
    oRouter = this.getRouter();
    if (oRouter.getRoute("appHome")!= undefined){
        oRouter.getRoute("appHome").destroy();
    }

    if (oRouter.getRoute("appHome")== undefined){
       oRouter.addRoute({
                        "pattern": "Home",
                        "name": "appHome",
                        "target": "Home"
       });
    }

thanks in advanced.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 23, 2017 at 07:42 PM

    what you are trying to do?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I want to restrict routes to user login, I thought of eliminating routes to which the user does not have permissions. I use the destroy () method, but when I log in again, it sends me a console message that the path already exists, so I'm not deleting it. Or maybe there is another method for this goal that you know?

Skip to Content