[API] Move angular dependency inward

This commit is contained in:
Victor Woeltjen 2016-01-06 11:15:36 -08:00
parent 76aa9e1fd2
commit 65fb5ab2a5
2 changed files with 10 additions and 11 deletions

View File

@ -39,10 +39,8 @@ requirejs.config({
define([ define([
'./platform/framework/src/Main', './platform/framework/src/Main',
'legacyRegistry', 'legacyRegistry'
"angular", ], function (Main, legacyRegistry) {
"angular-route"
], function (Main, legacyRegistry, angular) {
'use strict'; 'use strict';
new Main(angular).run(legacyRegistry); new Main().run(legacyRegistry);
}); });

View File

@ -41,24 +41,25 @@ define(
[ [
'require', 'require',
'../lib/es6-promise-2.0.0.min', '../lib/es6-promise-2.0.0.min',
'./FrameworkLayer' './FrameworkLayer',
'angular',
'angular-route'
], ],
function ( function (
require, require,
es6promise, es6promise,
FrameworkLayer FrameworkLayer,
angular
) { ) {
"use strict"; "use strict";
function Main(angular) { function Main() {
this.angular = angular;
} }
Main.prototype.run = function () { Main.prototype.run = function () {
// Get a reference to Angular's injector, so we can get $http and $log // Get a reference to Angular's injector, so we can get $http and $log
// services, which are useful to the framework layer. // services, which are useful to the framework layer.
var angular = this.angular, var injector = angular.injector(['ng']);
injector = angular.injector(['ng']);
// Look up log level from query string // Look up log level from query string
function logLevel() { function logLevel() {