getSnapshot method

Note: STABLE.
This API is reliable and breaking changes are unlikely.

qlik.app.getSnapshot (element, id)

Inserts a Qlik Sense snapshot into a HTML element. The snapshot fills the HTML object so you can size and position the element to determine how large the Qlik Sense object will be.

If you only supply one parameter, you will just get the model without displaying the object.

Version history

Introduced 1.1

Parameters

element

Type: Element | String

Optional.

HTML element or string with HTML element ID.

id

Type: String

Snapshot ID.

Returns

A promise of an object model

Tip: For more information regarding a promise, see https://code.angularjs.org/1.7.0/docs/api/ng/service/$q#the-promise-api.

Example

app.getSnapshot(document.getElementById("SNAPSHOT"),
	"uPyZavD");