mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[Framework] Begin work on main point-of-entry
Add main point-of-entry script for framework layer; performs only minimal tasks of loading framework dependencies and demonstrating that bundle list can be loaded using these. WTD-518.
This commit is contained in:
31
platform/framework/src/Main.js
Normal file
31
platform/framework/src/Main.js
Normal file
@ -0,0 +1,31 @@
|
||||
/*global define, requirejs*/
|
||||
|
||||
requirejs.config({
|
||||
"shim": {
|
||||
"../lib/angular.min": {
|
||||
"exports": "angular"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
define(
|
||||
[
|
||||
'require',
|
||||
'../lib/es6-promise-2.0.0.min',
|
||||
'../lib/angular.min'
|
||||
],
|
||||
function (require, es6promise, angular) {
|
||||
"use strict";
|
||||
|
||||
var injector = angular.injector(['ng']);
|
||||
|
||||
// Polyfill Promise, in case browser does not natively provide Promise
|
||||
window.Promise = window.Promise || es6promise.Promise;
|
||||
|
||||
injector.invoke(['$http', function ($http) {
|
||||
return $http.get('bundles.json').then(function (b) {
|
||||
console.log(b);
|
||||
});
|
||||
}]);
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user