Stencil object properties are not set, when they provided through the HTML string
问题 According to documentation, Stencil component's property myProperty @Prop({attribute: "my-prop"}) public myProperty?: object = {}; should be set by using this HTML code: <my-component my-prop="{hello: 'world'}" ></my-component> But, instead, it's set to default value (empty object). Boolean and string values work fine. Is it a bug, or I've overlooked something? 回答1: Stencil does not automatically parse object properties. You have two options: Set the property using JavaScript Set it as a HTML