systemjs - (OpenLayers) ReferenceError: ol is not defined -


i'm working on angular-cli based project. need include openlayers3 project using systemjs.

when setup systemjs on project including openlayers javascript file had error referenceerror: ol not defined.

this system-config.ts file

const map: = {   'ol': 'vendor/openlayers/dist/ol.js' };  /** user packages configuration. */ const packages: = {   'tether': {     defaultextension: 'js',   },   'vendor/ng2-slimscroll': {     defaultextension: 'js',   },   'ol': {     defaultextension: 'js'   } }; 

this error happens, still find ol.js file has been called in browser network debugger.

also, error gone when define ol.js using regular <script> tag in head of index page.


Comments