These are chat archives for canjs/canjs

Jan 2016
Jan 28 2016 02:28
@dbleier modules are singletons, but they are frequently used to return constructor functions. Just have your module return an object or can.Map instance
has them marked as deprecated. But yes, those other sections should be removed
please create an issue
Jeroen Cornelissen
Jan 28 2016 13:34

I need some help with a problem. See this jsbin:,js,output
If you click "Tab 1" it has 2 subtitles and if you click "Another tab" it should only have 1 subtitle but the second subtitle from Tab 1 stays.
Inside the useradapt-nav component (NavViewModel), I have a function that sets the activeForm.

setActivePage : function(el, activeForm) {

Any thoughts?

Mohamed Cherif Bouchelaghem
Jan 28 2016 14:33
@jeroencornelissen do you have a simplified version of your script?
Jeroen Cornelissen
Jan 28 2016 14:42
no, i don't
@cherifGsoul I already simplified it :worried:
Matthew Phillips
Jan 28 2016 15:16
@dbleier what @dylanrtt said is what I was thinking
Dovid Bleier
Jan 28 2016 15:17
@matthewp , @dylanrtt ok, cool. I'll try that route. thanks!
Guido Smeets
Jan 28 2016 15:25
@jeroencornelissen my guess is it goes haywire because you're binding to the same activeForm property twice on both the models
Jeroen Cornelissen
Jan 28 2016 15:31
@gsmeets How else would you pass an Observable to two or more components?
Guido Smeets
Jan 28 2016 15:39
hmm no, that wasn't the problem
Curtis Cummings
Jan 28 2016 16:26
@jeroencornelissen You need to pass true as the second parameter to your .attr call in setActivePage.
activeForm.attr('formModel').attr(), true);
Jeroen Cornelissen
Jan 28 2016 19:53
@ccummings Nice one, thanks! Never had to use that before.