Quantcast
Browsing all 3491 articles
Browse latest View live

Re : Whey an app uses mustache not stache?

I bet the warnings are because of this: https://github.com/bitovi/canjs/pull/919Do they say: Variable "' + key + '" not found in mustache template.'?If so, that's intended to help prevent silent...

View Article


Re : How can I override can.Component's lookup function?

Well, so there are a number of issues with using solely the can attribute approach:- it doesn't really work all that well when you need to access methods from components that are scattered in the dom...

View Article


Re : How can I override can.Component's lookup function?

Ahh, looking through can.route.map, it looks perfect for my purposes. I didn't realized just how powerful it is. Kudos

View Article

Re : Whey an app uses mustache not stache?

Well it warns about "keys" that are actually helpers, and they present in helpers and are rendered in view.

View Article

Avoding cross-domain issues with templates on CDN

What do people suggest for this?

View Article


Re : Avoding cross-domain issues with templates on CDN

For production you should compile your templates, not load them from a CDN.

View Article

Re : Avoding cross-domain issues with templates on CDN

How would you go about compiling them? The only solution I'm aware of at the moment is can-compile, and it doesn't work for can.stache.

View Article

How do I do the equivalent of compute.on/compute.off while using can.Map.define?

Hi guys,I'm trying to make a can.route.map that is able to bind to changes in the route and update itself. Essentially, I'd like to do...

View Article


Re : How do I do the equivalent of compute.on/compute.off while using...

I think you are using a set when you should be using get.

View Article


Re : How do I do the equivalent of compute.on/compute.off while using...

Also, value: {}will re-use the same object for every instance of the Map.  You should do:Value: Objectorvalue: function(){ return {}}But, what you probably want is actually more like:value:...

View Article

Re : How do I do the equivalent of compute.on/compute.off while using...

To better clarify the difference between get / set ....The setter is called when some explicitly sets the value via  .attr.  In your example, no one is setting pages directly so "set" is not...

View Article

Re : How do I do the equivalent of compute.on/compute.off while using...

For getters, serialize: false is not needed.  It's the default behavior.

View Article

Re : How do I do the equivalent of compute.on/compute.off while using...

Yea, the whole define thing, as well as using can.route.map are fairly new to me. I was thinking that the getter would return the resolved args, and the setter would accept a query, and tie into the...

View Article


Re : How do I do the equivalent of compute.on/compute.off while using...

Let's say that I rework this, and use a getter instead. That still posses the issue that I have no way treat that getter like a compute, and make it update when other properties change, such as route,...

View Article

Re : Build fails

Well, so far so good. Building works now:$ ./js.bat steal/buildjs http://dev.spotwizard.org/search.html -to .Building to ./  opening http://dev.spotwizard.org/search.html  adding dependencies  +...

View Article


Re : Missing doc.bat in documentjs

As described in http://javascriptmvc.com/docs/ documentjs/doc.bat has to be used but doc.bat is missing.

View Article

Re : How do I do the equivalent of compute.on/compute.off while using...

Tom, in this case you can use .replace which accepts a deferred. it would be:pages: {  Value: Page.List,  get: function(value) {    value.replace(Page.findAll({}));    return value  }}Notice that the...

View Article


Re : How do I do the equivalent of compute.on/compute.off while using...

Ok, while that is pretty useful, that only applies to findAll, not findOne, and doesn't solve the issue of binding to changes, such as the can.route query or page attribute. Right now I'm wondering the...

View Article

Re : How do I do the equivalent of compute.on/compute.off while using...

I'm not sure what you mean. Can you give an example of the functionality you are doing. Also, make sure you read the docs on define, checkout the make model year example. And, if you understand the...

View Article

Re : How do I do the equivalent of compute.on/compute.off while using...

Well, so I'd like to be able to do the equivalent of what is done with can.computes, where if a value cross-bound using an attr selector/compute is used within the getter, and then changes, the defined...

View Article
Browsing all 3491 articles
Browse latest View live