[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:
Victor Woeltjen 2014-10-31 16:43:16 -07:00
parent b55c6b8bce
commit de409fd8e7
2 changed files with 33 additions and 11 deletions

View File

@ -4,21 +4,12 @@
<meta charset="UTF-8">
<title></title>
<script type="text/javascript"
src="platform/framework/lib/require.js">
src="platform/framework/lib/require.js"
data-main="platform/framework/src/Main.js">
</script>
</head>
<body>
<!-- This is a placeholder for validating initial project structure -->
<script type="text/javascript">
require(
["platform/framework/src/Temporary"],
function (Temporary) {
"use strict";
document.writeln(new Temporary().someMethod());
}
);
</script>
</body>
</html>

View 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);
});
}]);
}
);