When creating a custom element in the DOM and adding a respective view model which implements bindable from the aurelia-framework, my view renders perfectly.
custom
I would modify as follows:
//chatbox.js
export class Chatbox {
answers = [{
name:'Reah Miyara',
nickname:'RM'
}];
addCustomElement() {
answers.push({
name:'Joe Smith',
nickname: 'JS'
}];
}
}
Then in your template, use a repeat.for
on the answers
property. Aurelia's binding system will ensure that there is an
tag for each element in the answers
array.
...
...