These are chat archives for canjs/canjs

13th
Feb 2019
apsignifi
@apsignifi
Feb 13 13:43 UTC

@apsignifi I think you’ll want to use a call expression {{{pageComponent()}}}

@chasenlehara: Thanks, that worked.

apsignifi
@apsignifi
Feb 13 14:05 UTC

can4: our app has a model callled attributes_sets with a property 'Type'. for each type, we are fetching properties from another model called 'attributes'. for example, a model 'product' has a property 'attribute_set_id' which is used to set property 'productAttributes'. In corresponding stache, I have this code for each attribute:

scope.vm.productAttributes.attributes.{{name}}

the issue is that once all this is setup, the properties/keys are not initialized so they generate a warning: Unable to find key "scope.vm.productAttributes.attributes.internal_name"

is there a way to initialize/add these keys to fix these warnings ?

Virendra Kumar
@virendrak-dev
Feb 13 18:18 UTC
Hi
how can we achieve following event in single page component? using canjs 2.
events: {
    "inserted": function() {
        this.viewModel.initDatePicker();
        this.viewModel.initTimePicker();
    }
}