Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 811 Bytes

DEV_GUIDELINES.md

File metadata and controls

44 lines (29 loc) · 811 Bytes

Development

Run npm install to get all node_modules that are necessary for development. Refer to scripts under package.json for more useful commands.

Build

$ npm run build

Test

$ npm run test

Usage example

This module provides the API to manage the model representation of the pages that are composing a SPA.

// index.html

<head>
...
    <meta property="cq:pagemodel_root_url" content="... .model.json"/>
...
</head>
...

// Bootstrap: index.js
import { ModelManager } from '@adobe/aem-spa-page-model-manager';

ModelManager.initialize().then((model) => {
    // Render the App content using the provided model
    render(model);
});

// Loading a specific portion of model
ModelManager.getData("/content/site/page/jcr:content/path/to/component").then(...);