i try to insert some element created in Qlik Sense into mashup app using angularjs. I have an service to get the object from Qlik Sense. Sense send me a promise. But these promise i dont know how insert into html code.
This is my code
define([
'js/qlik',
'app'
], function(qlik, app) {
let prefix = window.location.pathname.substr(0, window.location.pathname.toLowerCase().lastIndexOf("/extensions") + 1);
let config = {
host: window.location.hostname,
prefix: prefix,
port: window.location.port,
isSecure: window.location.protocol === "https:"
};
app.service('cube', function() {
const appSense = qlik.openApp('data.qvf', config);
this.getElement = function(id) {
return appSense.getObject('filter-div', 'ABFqkb');
};
}
});
and this is my controller:
define([
'app',
], function(app) {
app.controller('controller', function($scope, cube) {
cube.getElement().then(function(data) {
console.log(data);
});
// create a message to display in our view
});
});
my view is something like that
<div ng-controller="datos-generales">
<div id='filtro-datos'></div>
</div>
someone can help me to insert that element?