You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an ES6 Map as a optional state param in order to pass data from one state to another, the Map object's methods stop working once passed through to another state.
in the plunkr, transitioning between states without passing any stateParams works, and just instantiates a new Map. If you click one of the links that passes the Map as a stateParam, the plunkr breaks with the error:
Method Map.prototype.<methodName> called on incompatible receiver #<Map>
The text was updated successfully, but these errors were encountered:
Just did a little more digging, and its specifically ui-sref links with params that break. I've updated the plunkr to add two buttons that call $state.go instead, and those pass the parameters as expected.
mrohr
changed the title
State transition breaks ES6 Map when passed through optional $stateParams
State transition breaks ES6 Map when passed through optional $stateParams in a ui-sref
Dec 7, 2016
Following these steps:
- npm install uirouter/core uirouter/sticky-states uirouter/angularjs
- copy minified js
To be able to receive params by reference, needed for subobservation
nested state
(see angular-ui/ui-router/issues/3189)
Issue: BMS-5187 / BMS-5188 / BMS-5189
Reviewer: None
When using an ES6 Map as a optional state param in order to pass data from one state to another, the Map object's methods stop working once passed through to another state.
http://plnkr.co/edit/TVANV1Cnb8B7h95mNjmW?p=preview
in the plunkr, transitioning between states without passing any stateParams works, and just instantiates a new Map. If you click one of the links that passes the Map as a stateParam, the plunkr breaks with the error:
Method Map.prototype.<methodName> called on incompatible receiver #<Map>
The text was updated successfully, but these errors were encountered: