Dynamic loading of routes in a single-page application

2015 
Techniques for dynamically loading route and dependency information in a single-page application (SPA) that executes on a client device are provided. In one technique, a SPA includes a route handler that receives a requested route. The route handler determines whether the requested route matches any route in a list of routes. The only route that the request route may "match" is a wildcard route, which is associated with a function, when called with the requested route as input, causes a server request to be generated and transmitted from the client device to a server. The server responds with the requested route, dependency information for the requested route, and, optionally, one or more other routes, which may be "child" routes of the requested route. A module instance is generated based on the dependency information and loaded into the SPA.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []