A
A
Andrey Shiryaev2015-09-21 14:52:35
JavaScript
Andrey Shiryaev, 2015-09-21 14:52:35

Angular js (ui-router) question?

Hello.

.state('ap.a', {
            url: '/a',
            controller: IndexCtrl,
            controllerAs: 'PageCtrl',
            templateProvider: RouteHelpers.templateProviderFactory('ap.a'),
        })
        .state('ap.a.create', {
            url: '/creatb',
            controller: CreateCtrl,
            controllerAs: 'PageCtrl',
            templateProvider: RouteHelpers.templateProviderFactory('ap.a.create'),
        })

The first state contains a table with data (list). the second respectively creates an element. When switching to ap.a.create, the parent state also loads data that is not really needed. How, without making ap.a abstract, disable its operation when moving to a child state ?
PS Add another state? ala: ap.a.index is also not desirable.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question