Quantcast
Channel: JavaScriptMVC Forum
Browsing all 3491 articles
Browse latest View live

Re : Basic routing with can.Control

Did you call can.route.ready()

View Article


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 Article


Conventions, 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 Article

Re : 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 Article

Tell 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 Article


Re : 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 Article

Re : 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 Article

Re : 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 Article


Basic 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 Article


Re : 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 Article

Re : 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 Article

Scope 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 Article


Re : [ejs to mustache converting] Mustache Experts Needed!

http://jsfiddle.net/thecountofzero/hWmuq/

View Article

can.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 Article


Re : 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 Article

Image may be NSFW.
Clik here to view.

Re : [ejs to mustache converting] Mustache Experts Needed!

Impossible it's too easy for you!

View Article


Re : 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 Article

Re : 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 Article

Re : 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
Browsing all 3491 articles
Browse latest View live