/scripts/ahub.form.attachments.js
0

how delete route in app with routing

Mar 23, 2017 at 04:49 PM

59

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jun Wu Mar 23, 2017 at 07:42 PM
0

what you are trying to do?

Show 1 Share
10 |10000 characters needed characters left 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?

0
Skip to Content