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

Re : API guide on new canjs site is inconvenient

"What does that look outdated and excessive?  What would you replace it with?"Not clean and heavy design looks outdated. I would not use background to distinct headers:can.Construct([name,...

View Article


Re : [patch] can.Model.models incorrectly detects already converted data

Hello Curtis,  Thanks a lot for the example. Probably I need to research a bit more, because this approach didn't work for me the first time.  I'll give it a second try, thanks a lot!  Regards,  KIR

View Article


Re : Can I create nested templates with EJS?

Correct, you might have to initialize the template separately. This can be either in a separate file or from a string like this:can.view('comobobox.ejs', { itemView: can.view.ejs('<span><%=...

View Article

new user having a problem with the cookbook tutorial, funcunit/run command...

Hello, I've just started JavascriptMVC a few days ago, and I'm stuck on the cookbook example.  I'm trying to run js funcunit/run envjs cookbook/qunit.html to run the unit tests on the sample app.  I'm...

View Article

Re : API guide on new canjs site is inconvenient

the [] is used to indicate that an argument is optional.  It's super useful (and all over jQuery's docs which are used by pretty much everyone).

View Article


Re : API guide on new canjs site is inconvenient

DocumentJS + CanJS are open source projects.  If you'd like to help us improve the design substantively, we'll happily accept a mockup of tangible improvements.  But saying something is "ugly" doesn't...

View Article

Re : How do you build nested components

I guess you can't entirely avoid coupling at some level. Generally we were really successful with the approach of breaking everything up into smaller controls that are then composed by another. E.g. a...

View Article

Re : Can I create nested templates with EJS?

Hello Daff,  Thanks for the example! Do I understand correctly that there also should be something like   items: Items.findAll() in the model?  Regards,  KIR

View Article


Re : API guide on new canjs site is inconvenient

Don't take to heart definitions like "ugly", if I chose the word to express my perception inappropriately , I present my excuses.I tried to make my critics useful.

View Article


How to to ensure that model was deleted on server

If you one use destroy method on model instance it seems there is not way to say that something went wrong on server except sending status code other than 200, do I understand this correctly?What do...

View Article

Mustach question

cartItems - is observe list that contains items that has attribute itemId, I create helper (itemName) that generates Items nameWhen I do:<ul>    {{#cartItems}}    <li>{{itemName...

View Article

Re : Mustach question

In mustache any Observeable property passed to a helper will be turned into a can.compute. So itemId inside your helper is actually a function and so when your concatenate that with 'Item Name' you get...

View Article

Re : How to to ensure that model was deleted on server

That's how REST APIs work, with the HTTP status telling you what happened to a request. You can return error messages for non 200 status codes...For a DELETE, a successful response is a 200 or 204 and...

View Article


Re : How to to ensure that model was deleted on server

Thank you!

View Article

Can.Observe.List needs a sort().

Presently, Can.Observe.List has methods to join two lists and reverse the list:  can.extend(list.prototype, {    join : [].join,    reverse: [].reverse, }Support for sorting is absent, but a very...

View Article


Re : Can.Observe.List needs a sort().

it would not ... however, there is a sort plugin (I'm not sure if it's fully working).  You have to make sure you are creating the correct events on the list for it to work with live-binding.

View Article

Re : Mustach question

Thanks, is it possible to pass a list item itself (cartItem) to helper?I tried:<ul>    {{#cartItems}}    <li>{{itemName . }}</li>    {{/cartItems}}</ul>But there is an...

View Article


How do you connect the model to the view?

In the context of canjs (of course; we are in that forum), how would you answer this question?tyvm :^)

View Article

Re : Can I create nested templates with EJS?

Yes, you'd call ItemModel.findAll() to retrieve a list of models from the server.

View Article

Re : Mustach question

The context within a helper (this) will be the same context that you were in when the helper was called. So in the case of your template above, this inside the helper will be the item.

View Article
Browsing all 3491 articles
Browse latest View live