Load JavaScript and/or CSS libraries as needed
We want to support something like this: https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module
Proposed DG8 code usage:
var element = {};
element.foo = {
_markup: '<p></p>',
_attached: {
dg_google: ['maps']
}
};
return element;
The values within the _attached property should should multiple libraries from a namespace as an array e.g. ['maps', 'geocoder']
This feature has been added, awesome!
http://docs.drupalgap.org/8/Developer_Guide/Adding_CSS_and_JavaScript
I'm re-opening this, we need to load the assets one after another, because one may be dependent on the other loading first, case in point, Firebase requires firebase and app .js files before the messaging .js file can be loaded.