Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <aura:attribute name="environmentType" type="String" description="This variable is used to indicate which environment this component is displayed on, f.i. community vs standard lightning" />
  2.  
  3. <design:attribute name="environmentType" label="Environment Type" datasource="Community,Standard" required="true" description="Please indicate which environment this component is hosted on."/>
  4.  
  5. var environment = component.get('v.environmentType');
  6. if (environment == 'Community') {
  7. // Do Community logic
  8. } else if (environment == 'Standard') {
  9. // Do Standard Lightning logic
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement