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

Re : Adding support to steal to load pre-built modules

"As long as common doesn't Steal filemanager, when you build common, it wouldn't rebuild filemanager. But when you build filemanager, it will build and include common within filemanager's resulting...

View Article



Passing Parameters To can.Component's Scope

The following works by setting myObject to the value of someObject$("#dummy").append(can.view.mustache("<dummy-tag myObject='{{.}}'></dummy-tag>")(someObject);But what if I wanted to pass...

View Article

Re : Passing Parameters To can.Component's Scope

myObject="myObject"Remove the mustache braces. Sent from my iPhoneOn Jan 2, 2014, at 10:37 PM, JavaScriptMVC Forum <noreply@zohodiscussions.com> wrote:

View Article

Re : Passing Parameters To can.Component's Scope

And don't forget that HTML attributes are case insensitive and myObject attribute will be converted to "myobject" scope property, so to get myObject in scope you need to use hyphen style...

View Article

Model/Map that could get attrs from parent as Scope does

Have you ever thought of Models/Maps that could get properties from parent?can.Model({      document: ..      someProp: {            someMethod: function(){                  this.attr('document') //...

View Article


Re : Model/Map that could get attrs from parent as Scope does

Scope already does this?  Could you just use scope?

View Article

Uncaught Type Reference with jquery 1.10

I'm trying to use can to invoke a simple RESTful API.  Using can 2.0.4 and jquery 1.10.2, I get:Uncaught TypeError: Cannot read property 'setup' of undefined...

View Article

Re : Uncaught Type Reference with jquery 1.10

You need to pass a second empty object when creating a model:can.Model({ findAll : 'GET /api/users/user10254.demo/apps'}, {});Also, is there a reason why you are using Handlebars? CanJS 2.0.4 Mustache...

View Article


Re : Uncaught Type Reference with jquery 1.10

Thanks, got that now.  Handlbars is because I'm working slowly through retrofitting can into an existing App as a learning exercise.  Once I get the model-based communication with the server working...

View Article


Re : Uncaught Type Reference with jquery 1.10

Ok, really dumb question coming up.  It looks like can isn't enjoying my returned JSON doc (below).  Is there an easy way to ensure that I'm passing the array of "item" objects from this response to...

View Article

Re : Uncaught Type Reference with jquery 1.10

I'd recommend sticking with can.Mustache (Handlebars) so that you'll only have to slightly change your templates and use can.Component.

View Article

Re : Model/Map that could get attrs from parent as Scope does

It could be.  I just don't think it's for everyday use.

View Article

Anyone using something other than jQuery and Zepto?

If so, please let us know because I'm considering dropping support for everything else for 3.0.

View Article


Re : Uncaught Type Reference with jquery 1.10

Ok, I got it working.  Pretty ugly with a brute force conversion of the returned Object to an Array with:          var apparr = new Array();          for (i = 0; i < apps.length; i++) {...

View Article

Is it recommended use can Mustache instead of can EJS?

I see all latest examples written in can Mustache and not in EJS.I understand EJS is specific to canjs and Mustache has large community but in my project I have many templates in EJS.Is it recommended...

View Article


Re : Is it recommended use can Mustache instead of can EJS?

We are not dropping support, but we recommend Mustache because only it can be used with can.Component. Sent from my iPhoneOn Jan 4, 2014, at 12:16 AM, JavaScriptMVC Forum...

View Article

Re : Is it recommended use can Mustache instead of can EJS?

Arjun,Coming from someone who has been using CanJS and EJS for the last 4 years, I have decided to make the switch to Mustache. I need to get used to it, but I like the logic-less aspect of it. But...

View Article


Mustache Template for CSS

I am trying to use Mustache and a Map object for runtime skin switching.Inline CSS in a template should not be a problem:<script id="template" type="text/mustache">    <h1...

View Article

can.Compute is called too many times

Can you explain why in this fiddle (can.Component with can.compute in scope and compute change event handler)http://jsfiddle.net/xKc3H/293/after attr1 is set to value 1 can.compute "comp" is called 3...

View Article

Re : Model/Map that could get attrs from parent as Scope does

Well scope is designed for specific view needs, Maps/Models don't have a single parent object, that makes my suggestion illegal for default behaviour. I was trying to solve this problem...

View Article
Browsing all 3491 articles
Browse latest View live




Latest Images