I am working on a SPA that uses easy access to access data. I want to create an instance of metadata as soon as possible, and I believe that it will be after , this will complete the initialization:
var manager = new entityModel.EntityManager(serviceName);
However, the entity manager must execute an ajax request for the web api controller to download the metadata, and if I try manager.metadataStore.getEntityType("EntityName") before it finishes, I get:
Uncaught Error: Unable to locate an 'Type' by the name
My question is, is there an event that fires when metadata is loaded ? I wandered around the docs, but it seems like I can't find him.
source share