Created
May 8, 2018 08:53
-
-
Save sjurgis/0ad7c9702f58c4beb3bb3d3bd381d37d to your computer and use it in GitHub Desktop.
Service components using lax
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
<aura:component controller="FooService"> | |
<c:lax context="{!this}" /> | |
<aura:method name="getByAppName"> | |
<aura:attribute name="AppName" type="string" /> | |
</aura:method> | |
</aura:component> | |
({ | |
getByAppName : function(component, event, helper) { | |
return component.lax.enqueue('c.GetByAppName', event.getParam('arguments')) | |
} | |
}) | |
<c:FooService aura:id="FooService" /> | |
component | |
.find("FooService") | |
.getByAppName('baz') | |
.then(helper.getSuccess.bind(null, component, helper)) | |
.then(helper.getFail.bind(null, component, helper)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment