Re : how to catch 404s with can.route.pushstate
I'm thinking that there are 4 types of "unroutables": external host/port external path (outside app root) ignored route (can.route.ignore) unrouted pathWhat do you guys think of this as an API?: /*...
View ArticleConventions, strategy, syntax, file extension for external mustache...
Just curious what the best, most appropriate methodology is for external mustache template files. Syntax, loading, rendering etc ... Just started to test on my own but hoping to kick start the...
View ArticleRe : Conventions, strategy, syntax, file extension for external mustache...
Do all your work as mustache templates, then load them by relative url. IE: template: can.view.('views/video.mustache')Then, later on, when you start adding a build process, you can use can.compile to...
View ArticleTell scope (defined as function return) take attribute as string
When I return scope as function how can I tell that a particullar scope attribute should be taken from element atrribute as string ?<my-component key="email"></my-component>I want key to be...
View ArticleRe : Basic routing with can.Control
It works, I had a problem with my can.jquery.js library.Thank Justin and Tom for your help
View ArticleRe : Conventions, strategy, syntax, file extension for external mustache...
Thanks Tom. That's a great start and sounds like a good game plan. Build process is ideal but a little ways down the road.EDIT: Sorry, check the 1st part. Just realized we didn't have can.mustache...
View ArticleRe : Conventions, strategy, syntax, file extension for external mustache...
Still curious what the best approach is to act on return data. I'm having a little trouble with how Deferred methods act on what is returned from a model's findAll.For instance:var SomeModel =...
View ArticleBasic routing with two properties
I make this routing test with properties, search and registration for vehiclesmy code $(function() { Router = can.Control({ "vehicles" : function(){ console.log("the hash is #!vehicles")...
View ArticleRe : Conventions, strategy, syntax, file extension for external mustache...
Matt, the data format is defined by your API, not the other way around. The only real expectation is that each object will have an id field, which toggles between create and update when invoking save....
View ArticleRe : Basic routing with two properties
Phane, the routes you have defined have indistinguishable patterns. In your third example, search and registration have already been defined, and when you update search, you never stopped matching...
View ArticleScope function (method) vs component helper
What should one take into considerations when deciding using helper or function?Is it ok to have the attribute (or method) in scope and helper with the same name?scope: { count: 1},helpers: {...
View Article[ejs to mustache converting] Mustache Experts Needed!
I'm working on the following code . It go through a can.List or an Array.<% people.each (function ( person ) { %> <li <%= (el)-> el.data('personInfo', person ) %>> <h2><%=...
View ArticleRe : [ejs to mustache converting] Mustache Experts Needed!
http://jsfiddle.net/thecountofzero/hWmuq/
View Articlecan.compute in a can.List
Just wondering why this doesn't work. This actually came up in our CanJS Boston meetup last night:Numbers = can.List.extend({ sum: can.compute(function() { var sum = 0;...
View ArticleRe : Basic routing with two properties
ok, but i can listen when property page is a particular value ?examplei would like make this is :$(function() { Router = can.Control({ "route": function(){ console.log("the hash is empty")...
View ArticleRe : [ejs to mustache converting] Mustache Experts Needed!
Impossible it's too easy for you!
View ArticleRe : Anyone using something other than jQuery and Zepto?
I agree with johnhenry here, but would suggest that you keep the existing util files there as boilerplates and continue to leverage the "works with any library" verbiage. I think we all agree that...
View ArticleRe : can.batch.start callback called too early in can.Map.extend() init?
Justin, I tried adding event.pause and event.resume to my can.remove override function, but I couldn't get it to work with the above mentioned scenario because there're two "removing" events running;...
View ArticleRe : Scope function (method) vs component helper
This doesn't answer your question - but you need to do some research on object oriented javascript and scope. Try googling the "javascript module pattern".Also, you should commit this to memory: "The...
View Article