angularjs scope - ionic angular controller statement block only runs once -
i have "coupons.html" , when click coupon item i'm taken "single-coupon.html" singlecouponctrl
called:
.controller('singlecouponctrl', function($scope, $state, userservice) { console.log("fire single coupon controller"); })
so when start on "coupons.html" , click item see
fire single coupon controller
in console if hit button , click item again don't repeat of "fire single coupon controller". shouldn't seeing again since i'm recalling page? if not, how can controller run again?
i've tried using ng-init
, $scope.init
accomplishes same thing.
ionic cache lot of things. personnaly following on routing js ( cache: false,
)
.state('camera',{ url:"/camera", cache: false, controller:"cameractrl", templateurl:'app/views/loading/index.html'
})
Comments
Post a Comment