On the navigation bar, I have a shopping cart snapshot (total items, total price) which uses $scope.cart
.
In the ng-view
, there are pages to add/remove items in the shopping cart.
It appears that ng-view
created an isolated scope. If I add items into $scope.cart
, it goes to the scope that belongs to ng-view
. How can ng-view
share the parent scope?