These are chat archives for canjs/canjs

15th
Apr 2017
Gira Minus
@gKreator
Apr 15 2017 13:56
in the models what is the best way to provide a model url?
blob
thats how i am doing it currently
Nico R.
@nriesco
Apr 15 2017 19:35
@gKreator were do you get AppConfig from?
you should probably add the /api to it in case you decide to move the api or use a new version of it (somtimes people tend to use a /v1/sessions, /v2/sessions structure
as for 1.0 (donejs) generator, it creates in the supermodel a url that is url: loader.serviceBaseURL and then adds whatever you provided as input so you can either use serviceBaseURL or myApiBaseURL
fixtures should work the same
Nico R.
@nriesco
Apr 15 2017 19:40
but I haven’t used any fixtures in version 1
Gira Minus
@gKreator
Apr 15 2017 19:50
ohh yeah its just a js object nothing fancy i did move the /api/ into it earlier
i havent used super models yet
any good doc on that?
Nico R.
@nriesco
Apr 15 2017 20:32
not sure but just use donejs add supermodel yourModelName and it will generate everything, then import it in your viewmodel and use .getList({}) and start retrieving data. On the .stache you’ll need to wait until resolved