I have the following model called 'posts'
export default DS.Model.extend({
title: DS.attr('string'),
content: DS.attr('string'),
key: DS.attr('string'),
date: DS.attr('date'),
isLocked: DS.attr('boolean')
});
And I have an attribute called content
that is meant to be the body of my post.
When I first refresh the page. I keep noticing that my textarea (which, by the way, is bound to my content attribute) keeps already having this information filled in there. Title is also bound to my title attribute but it doesn't do this.
So I tried switching the bindings such that my text area is no longer bound to 'content' but to 'title' and that fixed it! I'm not sure what it doesn't like about the attribute called 'content'. Is the name 'content' special?
Aucun commentaire:
Enregistrer un commentaire