Lost functions after load page using navigate

Guys, i’m on main page (main.html)
When i use app.views.main.router.navigate(’/page/’); its ok, loading /page/ perfectly.

but, if i go back to (main.html), its lost some work functions.

eg:
Uncaught TypeError: storySwiper.update is not a function
Uncaught TypeError: JSON.parse(…).forEach is not a function

Would be good to see more complete example of related code

1 Like

Kitchen sink default panel-right index.html

<div class="panel panel-right panel-reveal panel-resizable panel-init">

Kitchen sink default page link to another component, eg: accordion.html
<a class="item-content item-link" href="/accordion/">Accordion page </a>

Working click function inside accordion.html

    $(document).on('click', '.link-open', function (el, prevent) {
        app.views.main.router.navigate('/tab/');
    });

Route tab

{name: 'tab', path: '/tab/', component: './pages/tab.html'},

Working click function inside tab.html linking to home

    $(document).on('click', '.link-open', function (el, prevent) {
        app.views.main.router.navigate('/');
    });

Route to home

 {path: '/', url: '/' },

When i come back to default home, i lost the property panel and others functions.
eg:
Uncaught TypeError: Cannot read property 'panel' of undefined

I’m using Kitchen Sink, the problem appear after app.views.main.router.navigate.