I have an app.js file that contains two named modules ("foo" and "bar", where "bar" relies on "foo").
Query: How do I load "bar" in the browser?
Please note: I am still learning about SystemJS and finding the documentation a bit overwhelming.
app.js
System.register("foo", [], function(exports_1) {
"use strict";
var App;
return {
setters:[],
execute: function() {
App = (function () {
function App() {
this.bar = 'Hello world.';
console.log(this.bar);
}
return App;
})();
exports_1("App", App);
;
}
}
});
System.register("bar", ["foo"], function(exports_1) {
"use strict";
var App;
return {
setters:[],
execute: function() {
App = (function () {
function App() {
this.bar = 'Many a little makes a mickle.';
console.log(this.bar);
}
return App;
})();
exports_1("App", App);
;
}
}
});