[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([
'./platform/framework/src/Main',
'legacyRegistry',
"angular",
"angular-route"
], function (Main, legacyRegistry, angular) {
'legacyRegistry'
], function (Main, legacyRegistry) {
'use strict';
new Main(angular).run(legacyRegistry);
new Main().run(legacyRegistry);
});

View File

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