Hi all!
I have struggled many times to include AngularJS Material into my Qlik Sense extension for use and I cannot seem to succeed. Please find below my basic approach to including the appropriate resources and adding a date picker into my HTML. What else should I be doing?
HTML
<md-datepicker ng-model="theDate" md-placeholder="Enter date"></md-datepicker>
JavaScript
define([
"./properties",
"./initialproperties",
"text!./template.ng.html",
"css!./material-ui/1.1.12/angular-material.min.css",
"./material-ui/1.1.12/angular-material.min",
"./angularjs/1.7.6/angular.min",
"./angularjs/1.7.6/angular-animate.min",
"./angularjs/1.7.6/angular-aria.min",
"./angularjs/1.7.6/angular-messages.min",
"jquery",
"qlik"],
function(
props,
initProps,
ngTemplate,
cssAngularMaterial,
jsAngularMaterial,
jsAngular,
jsAngularAnimate,
jsAngularAria,
jsAngularMessages,
$,
qlik) {
"use strict";
return {
definition: props,
initialProperties: initProps,
snapshot: {
canTakeSnapshot: false
},
template: ngTemplate,
support: {
export: true
},
resize: function($element, layout) {},
paint: function($element, layout) {
/* PAINT CODE */
},
controller : ["$scope", "$http", "$compile",
function($scope, $http, $compile) {
/* EXTENSION CODE */
}
]
}
}
);
Cheers and thank you in advance!