Month: May 2016

Lightning Components Facets

Today I want to talk a bit about Lightning Component Facets. What is a Facet? A facet is an attribute that we can define and place in a subcomponent, in order that another container component, which references the subcomponent, can fill up the facet space with some html code. Note that the subcomponent and container component are simply components, but I will call them in this way in order their relationship is easier to understand .

A facet attribute is similar to any other component attributes, but instead of having a primitive, collection, sObject or custom class type, it has an “Aura.Component[]” type. And instead of holding those kind of data, it will hold HTML markups or even another component.

Continue reading “Lightning Components Facets”

Lightning Components Attributes

Lightning Components attributes are used to:

  • Pass information from one component to another component.
  • Pass information from an app to a component.
  • Pass information from an url query string to an app.
  • Hold information that is dynamically changed (eg: through javascript) and which is dynamically referenced within an app or component.

This is, attributes can be defined within a component or within an app. The purpose of this post is seeing examples of the types of attributes that we can define and how can we pass them from one component to another. Passing attributes from an app to a component would work exactly in the same way. For more information on dynamically setting attributes in an app through the query string, take a look at this.

Continue reading “Lightning Components Attributes”