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

Re : Nested controls in a live binded template

Great answer thanks.We're stuck without can.Components for now, so I've gone with using the element callback to trigger a "rendered" event.<div class="resources_int" <%= (el) ->...

View Article


Re : Best convention for re-render/update of part of section

Absolutely. That's the joy of live-binding :)

View Article


Re : Is there any can.Construct equivalent to the sugar event syntax?

No there isn't anything like that built in. I usually just create a can.Control on the document body and pass it the global state object if I need to handle general events.

View Article

Re : Why use Models.model()

Thanks for the clarification alex.

View Article

Route Bindin

Hey Justin/Brian/CanJs Team, It's Josh from BrightRoll, I hope all is well and look forward to seeing you guys again soon!I'm experiencing an issue where a route binding is matched twice when it isn't...

View Article


Which CanJS files do I use with StealJS

I just downloaded the new version of CanJS using the download link on the website. The zip archive contains a ton of files but the readme doesn't describe them. I want to use StealJS with CanJS 2.0.6...

View Article

Re : Which CanJS files do I use with StealJS

Hi,The steal and amd folders contain the same base code of canjs just the first works with stealjs as dependency manager and the second works with requirejs the others files (outside steal and amd)...

View Article

Re : Which CanJS files do I use with StealJS

Hi CherifThanks for the help. I feel a little stupid getting stuck so early in the process. If I use the base files in the steal directory is the jQuery library in there? I broke out the file listing...

View Article


Rebind on() with live template

hi guys.a have a problem with can.Controlhere is jsfiddle: http://jsfiddle.net/84hRB/4/i use live templating with can.Mustachei have some offers to display. via ajax i get json objecs that i push into...

View Article


Re : Which CanJS files do I use with StealJS

No the jquery is not there,  you need a stealconfig  file to map each dependency to source file for example:steal.config({ map: { "*": { "jquery/jquery.js": "jquery", "can/util/util.js":...

View Article

how to use replaceState for route?

Hi,I'd like to have some more control when changes in the route should be stored or replaced in the history.I've got this form where the user can use a lot of filters to make a selection. The route...

View Article

Re : Recursive mustache

Can anyone explain me what I'm doing wrong?My recursive loop isn't rendering as I expected.All my child items are rendered as categories:http://jsfiddle.net/KKn5G/1/

View Article

Re : how to use replaceState for route?

I believe I've found what I needed:     can.route.bindings.hashchange.setURL= function( path ) {         location.replace('#!' + path);         return path;     };does what I want.

View Article


Re : Rebind on() with live template

Couple things I noticed, you are binding the control and event handler to the dynamically generated offers as opposed top the parent dom element, #wrapper.  Why not instantiate the control on wrapper...

View Article

Re : Best convention for re-render/update of part of section

daff, thoughts on this one https://forum.javascriptmvc.com/#Topic/32525000001606009

View Article


Re : Rebind on() with live template

Hi Matt,i bound the control to the parent DIV (#wrapper).but by logic, i interact with the offer e.g. click them and rate them width stars, mouseover and mouseleave.so the interaction is with the...

View Article

Re : Recursive mustache

Looks like you were rendering the category container whether or not cat was true.  Try this instead: http://jsfiddle.net/KKn5G/3/

View Article


Re : Rebind on() with live template

Matt is right. you should bound to the parent. and it's more resources efficient through delegation.You lost nothing when tacking the events happened to offers. http://jsfiddle.net/maxisme/3UqS9/1/

View Article

Re : Recursive mustache

Thanks, figured out something was wrong with the template but couldn't pin point it.Your fiddle works fine in my project if I use a fixed array with objects but if I use a Model.List it fails.Keeps...

View Article

Re : Recursive mustache

It works if you don't surround the recursive reference with {{#with items}}.  http://jsfiddle.net/KKn5G/9/I see that my previous fiddle revision (#3) included that, but it was an artifact from when I...

View Article
Browsing all 3491 articles
Browse latest View live