TypeError:无法读取属性' $ destroy'未定义的角度

时间:2015-08-22 09:21:49

标签: javascript angularjs ionic

我有Logout控制器

 .controller("AuthLogoutCtrl", function($state) {
        localStorage.clear();
        $state.transitionTo("login");
    });

当我到达它时会出现以下错误

TypeError: Cannot read property '$destroy' of undefined
at Object.headerBarInstance.destroy (ionic.bundle.js:47548)
at ionic.bundle.js:47912
at Scope.$broadcast (ionic.bundle.js:23412)
at Scope.$destroy (ionic.bundle.js:23032)
at Scope.scopePrototype.$destroy (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1943)
at Object.destroyViewEle (ionic.bundle.js:46743)
at self.transitionEnd (ionic.bundle.js:48099)
at ionic.bundle.js:46630
at forEach (ionic.bundle.js:9015)
at ionicViewSwitcher.transitionEnd (ionic.bundle.js:46629)

以下是登录控制器代码

 .controller("AuthLoginCtrl",function($scope, $state, AuthSvcs, Toast, ApartmentData, $localstorage, $ionicLoading) {
        if ($localstorage.get("Login")) {
            $state.transitionTo("app.settings.SelectCommunity", {
                url: "login"
            });
        }

请建议无法识别出我正在使用离子框架

的错误

0 个答案:

没有答案