Michael
Michael

Reputation: 13616

Nested state does not reloaded

I have this nested state:

       .state("inspectionsBuilder.view.step3", {
            url: '/step3',
            templateUrl: "../app/inspectionsBuilder/templates/NestedViews/FormStep3.html",
            controller: "inspectionBuilderStep3Controller",
            controllerAs: "builderStep3",
            resolve: {
                inspectionItems: ["lookupService", inspectionItemsResolver]
            }
        })

at some point when I press button I need to reload current nested state:

 inspectionItemsServises.save(newInspectionItem).then(function (result) {
            $state.go("inspectionsBuilder.view.step3");
        }, function (err) {

        });

The inspectionItemsServises is post service that excuted when I press the button. But state does not reload.

Any idea why nested state does not reload?

Upvotes: 0

Views: 24

Answers (1)

Poyraz Yilmaz
Poyraz Yilmaz

Reputation: 5857

you should send reload: true as a ui-router parameter. Try this

$state.go("inspectionsBuilder.view.step3", {}, {reload: true});

second one is state parameters if you have fill them too...

Upvotes: 1

Related Questions