Re : can.Component Helper Functions
Pretty sure I answered my own question here. Need to use isActive: function(options) { if(options.scope.attr('attrName') === 'true') { return options.fn(this); } else { return...
View ArticleRe : can.Component inserted event fires twice on the same element
No, I just completely got rid of naked can.Controls =)before that I did a workaround:inserted: function(){ if (this._inserted) return this._inserted = true .... }
View ArticleRe : can.Component Helper Functions
Next question though. Shouldn't this be live bound? Changing the value of "attrName" to something other than "true" should cause the view to re-render, right? Right. Note that, component's helpers have...
View ArticleRe : In can 2.0.3, namespacing events does not work
Yes, this was not supposed to work in 2.0. jQuery's names spaced events were the source of bugs. Sent from my iPhoneOn Nov 30, 2013, at 7:28 AM, JavaScriptMVC Forum <noreply@zohodiscussions.com>...
View ArticleRe : can.Component Helper Functions
Once again answered my own question.isActive: function(options) { if(this.attr('attrName') === 'true') { return options.fn(this); } else { return options.inverse(this); }},So...
View ArticleRe : Cannot pass models as attributes into components
If you can provide an example (jsfiddle is good), report this to the project: https://github.com/bitovi/canjs/issues?state=open
View ArticleRe : How does event unbinding work in CanJS?
The canjs video and getting started guide both talk about how can.Contol is able to unbind declarative event handlers. Sent from my iPhoneOn Nov 30, 2013, at 7:28 AM, JavaScriptMVC Forum...
View ArticleRe : Mustache {{#each tag}} and {{#tag}} are inconsistent
You'll have to give a smaller example (jsfiddle) if you want me to check this soon. I'm on vacation. But, you might want to do that so other people can easily help as well. Try to reduce your code to...
View ArticleRe : can.List does not initialize computes
Why do you want this on a list? It doesn't seem very useful. Sent from my iPhoneOn Nov 30, 2013, at 7:28 AM, JavaScriptMVC Forum <noreply@zohodiscussions.com> wrote:
View ArticleRe : can.List does not initialize computes
There are certainly use cases where it's useful. For example, if you wanted to add extra attributes for the current item, selected item, current index, selected index, next index, previous index, etc....
View ArticleRe : Mustache {{#each tag}} and {{#tag}} are inconsistent
Ok, I'll create a JSFiddle to demonstrate. Happy honeymooning!
View ArticleRe : How does event unbinding work in CanJS?
It talks about it in the tooltip example on http://canjs.com/docs/can.Control.htmlAnd in destroyhttp://canjs.com/docs/can.Control.prototype.destroy.htmlYou can edit the doc source to make improvements....
View ArticleRe : can.Component inserted event fires twice on the same element
Would like to avoid having to do that as it doesn't fix the underlying issue.
View ArticleRe : can.Component inserted event fires twice on the same element
To get it fixed at least you should reproduce it in fiddle.
View ArticleHow should I mix data from 2 different requests in a single view?
Hi, I am fairly new on MVX JS frameworks and I 'd like to know if there is any good practice, or if it is a good practice itself mixing data from two different requests (diff REST url on this case) in...
View ArticleExtending components content problem.
Hello, i'm trying to create extended version of the component by wrapping in to extended version:Here is the code, some-feature has inside content and is expected it to be filled with something, then...
View ArticleRe : How should I mix data from 2 different requests in a single view?
View parts may be rendered as soon as data arrives. So consider this view:{{#general}}<p>Name: {{name}}</p>{{/general}}{{#details}} <p>age: {{age}}</p>...
View ArticleRe : How should I mix data from 2 different requests in a single view?
Yep, that makes sense.Thanks about that!Although I thought apply a method (global counter) which knows how many requests I need and then render the view only once I know all my requests have got an...
View ArticleRe : How should I mix data from 2 different requests in a single view?
Views are live bound to supplied data (it is called view's scope), so every time general or general.name is updated live bound view part will be rendered again.It depends on your application logic...
View ArticleRe : In can 2.0.3, namespacing events does not work
To still bind to those events should be able to use jQuery directly like $(target).on('change.123', can.proxy(this.onChange, this)).
View Article