Hey Justin/Brian/CanJs Team, It's Josh from BrightRoll, I hope all is well and look forward to seeing you guys again soon!
I'm experiencing an issue where a route binding is matched twice when it isn't expected to be matched(At least unexpected by me).
--We call the following from another area of the app(to be specific a grid row onclick handler):
and based on the definition below, I see routeBarEdit fire twice, instead of once which is what I would expect
Thank you in advance for any suggestions/pointers/guidance.
I'm experiencing an issue where a route binding is matched twice when it isn't expected to be matched(At least unexpected by me).
--We call the following from another area of the app(to be specific a grid row onclick handler):
- var routeObj = {
- }
- can.route.attr(routeObj, true);
and based on the definition below, I see routeBarEdit fire twice, instead of once which is what I would expect
- /* globals uiReady */
- steal(
- 'can'
- ).then(function() {
- 'use strict';
- can.Control('Foo.Router', {}, {
- ....
- route: function() {
- can.route.attr({
- route: 'foo/'
- }, true);
- },
- ....
- routeBarEdit: function(route) {
- // I see this called twice
- GlobalNameSpace.Control.changePageController(Foo.Bar.Router, {
- module: 'foo',
- name: route.foo_name || 'Bar'
- });
- },
- // Edit Bar
- 'foo/:foo_id/:foo_name/bar/:action route': 'routeBarEdit',
- 'foo/:foo_id/:foo_name/bar/:action/:ids route': 'routeBarEdit',
- 'foo/:foo_id/:foo_name/bar/:action/:ids/ route': 'routeBarEdit'
- });
- });
Thank you in advance for any suggestions/pointers/guidance.