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

_cid Added to Object

I have an object with a few properties. When I add that object to a can.Map the property "_cid" is added to my object.This is happening after my upgrade to 2.0.2Is this expected?I don't want it there....

View Article


Re : _cid Added to Object

can you create a test?

View Article


Re : _cid Added to Object

https://github.com/bitovi/canjs/pull/566

View Article

Re : _cid Added to Object

It's this line that's adding ithttps://github.com/bitovi/canjs/blob/master/map/map.js#L149

View Article

Passing scope value to global helper in can.Component

How do I pass a value from the can.Component's scope as the parameter to a mustache global helper function?<h1>{{l10n appTitle}}</h1>l10n is the global helper and appTitle is defined on the...

View Article


Re : Passing scope value to global helper in can.Component

Create fiddle.BTW I would recommend you make your own component for l10n and i18n for example I made:<t-text dict="dict" lang="en" key="appTitle"></t-text>where I pass a dictionary, lang...

View Article

Re : Passing scope value to global helper in can.Component

scope attribute is passed as its compute to helper, not sure if you consider this. Fiddle would help.

View Article

Re : Passing scope value to global helper in can.Component

http://jsfiddle.net/thecountofzero/qYdwR/1115/

View Article


Re : Passing scope value to global helper in can.Component

As I've mentioned above scope attribute (as any can.Map's/Obeserve attribute) is passed to helper as its compute value (it was made to allow two-way binding), so to get value you should use key(), not...

View Article


Re : Passing scope value to global helper in can.Component

Thanks @alex

View Article

Do I Have A Memory Leak?

Let me first put the disclaimer up here that the existence of this post by no means indicates that there is actually a memory leak, but I wanted to get some experts's opinions.Perhaps it's just the...

View Article

Re : Live Binding Remnants

I forgot to mention that if you use <%== CODE %> magic tags instead of <%= CODE %>, then the bindings do get torn down.

View Article

Re : Live Binding Remnants

does this happen if you are not using model?

View Article


Re : Declaring default attributes from upper level scopes

you can overwrite the scope property to do pretty-much whatever you want:look at scope's function(attrs, parentScope, element)signaturescope: function(attrs, parentScope, element){  return new...

View Article

Re : Live Binding Remnants

Yes. Updated the fiddle to use a can.Maphttp://jsfiddle.net/thecountofzero/RusPR/3/

View Article


Re : Swallowing Console Errors?

Is it supposed to do that? I have the same issue. Should I just put a console.log in the catch?

View Article

Re : Live Binding Remnants

Here is a breaking test which can be added to ejs_test.jstest("_bindings removed when element removed", function() { var template = can.view.ejs('<div id="game"><% if(game.attr("league")) {...

View Article


Re : Live Binding Remnants

That can't be added because it is using jQuery directly.Also, what happens if the parent element is removed from the page?  Sometimes, bindings are only removed if the parent element is removed.  This...

View Article

Re : Live Binding Remnants

I take some of that back ... setup calls listen .. not sure what is happening.

View Article

Re : Live Binding Remnants

https://github.com/bitovi/canjs/pull/578

View Article
Browsing all 3491 articles
Browse latest View live