Closed ramstein74 closed 9 years ago
@ramstein74 there would be two different ways to accomplish this. If you can share your project code I can advise a method to use.
Template.myTemplate.helpers({
attributeObject: function (){
//"this" is the data context of your template
return {checked: this.checked}
}
});
//mongo document
{
"name": "My Name",
"occupation": "My Occupation",
"attributeObject": {"checked": true}
}
Ok if that is the way it works.
Just dont understand why you did it like that. It would be easy to debug if we could write in the html all the params to polymer.
Hiding all inside an object repeatedly for every record i may need, seems a waste of space( if inside collection) and harder to debug and code.
in this example {{> paper_checkbox attrs=attributeObject}}
what if i use this inside an each statment ? for each i want to pass a value to attibuteObject like each param {{> paper_checkbox attrs=attributeObject(param)}} /each how do i do it ?
thank you