These are chat archives for canjs/canjs

2nd
Mar 2017
Viktor Busko
@Lighttree
Mar 02 2017 14:31

@chasenlehara I think that you are right, and actually I tried to apply List.Map, but didn't succeed with this.

It seems that your JSbin for some another thing :)

Here is JSBin:

http://jsbin.com/pupikijaxa/1/edit?html,js,output

I'm looking for correct way to track changes of capValue in spendTimePeriodEmployeeGroups because I need to do some formatting of values + validation + do some behavior depends on values. And usually define plugin helps a lot with this.

Maybe if I can convert spendTimePeriodEmployeeGroups to can.List and elements of this list will use correct can.Map with 'Defined' behavior this will solve my issue.

deepasrikanth
@deepasrikanth
Mar 02 2017 21:49
Hi I have a question about canJS Model. The model I have has an API call. I have need to make another API call to get associated objects of this model. How can I make it so that my model supports two different API calls.
Frank Lemanschik
@frank-dspeed
Mar 02 2017 22:10
@deepasrikanth did you look into feathersjs
and the feathersjs canjs integration?
deepasrikanth
@deepasrikanth
Mar 02 2017 22:21
have not.. will check it out.. is there any other simpler solution without another js integration?
Frank Lemanschik
@frank-dspeed
Mar 02 2017 22:21
sure you can always code a function and use that
the canjs model is made for that so you simply need to code a function like a get set and then your done
simply post a jsfiddle or jsbin of your current model some one will then fast see where to do and how to do a secund call
the model in general is super model that uses http://canjs.com/doc/can-connect.html#connect_behaviors_options_
here also study maybe the chat guide for that the part about messages and usage of supermodel for that
deepasrikanth
@deepasrikanth
Mar 02 2017 22:28
thanks I will check it out
Frank Lemanschik
@frank-dspeed
Mar 02 2017 22:29
your welcome
Nico R.
@nriesco
Mar 02 2017 22:56
is there a way to trigger an action when a user modifies an <input> element, or when you clicke somewhere else (loose focus). Something like using enter as an event.
Kevin Phillips
@phillipskevin
Mar 02 2017 22:58
not sure if you’re asking something more complicated, but this is how you trigger functions from dom events: http://canjs.com/doc/can-stache-bindings.event.html
Nico R.
@nriesco
Mar 02 2017 22:59
looks like onfocusout is what I was looking for.. I’ll give it a try later
thanks @phillipskevin