Last active
February 24, 2016 10:35
-
-
Save rsussland/135bc5bde14674b34029 to your computer and use it in GitHub Desktop.
contract violation example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App: | |
<aura:application > | |
<aura:attribute name="display" type="Boolean" default="true"/> | |
<ui:button aura:id="button" label="Click to toggle" press="{!c.toggle}"/> | |
<aura:renderif isTrue="{!v.display}"> | |
Here's some text! | |
<aura:set attribute="else"> | |
Here's a react component: | |
<c:ReactSearch /> | |
</aura:set> | |
</aura:renderif> | |
</aura:application> | |
Controller: | |
({ | |
toggle : function(component, event, helper) { | |
component.get('v.display') ? component.set('v.display', false): component.set('v.display', true); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment