how to render

What should this tag render ? Is anything missing this tag as

<aura:html tag="div" body="Iam inside  div tag " />

as per sfdc documentation
this is first class object in lightning


Like any other component in aura, the body attribute accepts array of Aura.Component instances(Aura.Component[]).

In our case aura:html expects body to be of type Aura.Component[].I think it is ignored because of the type mismatch.

You can set the aura:html’s body attribute in the markup implictly by doing this:

<aura:html tag="div">Hello World</aura:html>

Anything within the start tag and end tag be it a custom component, aura/ui/lightning namespaced component is considered as the body of that particular component.

Source : Link , Question Author : JaySun , Answer Author : Praveen

Leave a Comment