Created
October 31, 2018 01:49
-
-
Save choudharymanish8585/313313ec4ccf2368dd70e3bbe12629a4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
({ | |
/** | |
* Retrieve the data from server | |
* */ | |
onInit : function(component, event, helper) { | |
var action = component.get("c.getRecords"); | |
action.setStorable(); | |
action.setCallback(this,function(response) { | |
console.log('Response Time: '+((new Date().getTime())-requestInitiatedTime)); | |
var state = response.getState(); | |
if (state === "SUCCESS") { | |
//set records attribute with unfiltered data | |
component.set("v.records", response.getReturnValue()); | |
} | |
}); | |
var requestInitiatedTime = new Date().getTime(); | |
$A.enqueueAction(action); | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment