Imago

Javascript

Imago Model

ImagoModel is where the data get fetched from the server, and after it's fetched, it's stored in memory.

If the data is already available in the Model, it will fetch the localData automatically and not make a new request.

imagoModel.getById( String: id )

Will return a promise with the data with the asset

imagoModel.getData( query )

Get data will return the data based in the query.

Query

The query accepts either a string for a path or an object.

A string defaults to the path. The following queries are the same.

imagoModel.getData('/home')
imagoModel.getData({ path: '/home' })

Query Options

Parameter Type Description
path String Path to query
recursive Boolean If true queries an additional level of assets