From 65a767d9b0b2816af86065083108bd517c35ce48 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 2 Jul 2015 19:43:16 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20export=20angular=20as=20=E2=80=98ng?= =?UTF-8?q?=E2=80=99=20in=20SFX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/angular2/angular2_sfx.ts | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/modules/angular2/angular2_sfx.ts b/modules/angular2/angular2_sfx.ts index ef31e617ec..63e8b0042a 100644 --- a/modules/angular2/angular2_sfx.ts +++ b/modules/angular2/angular2_sfx.ts @@ -4,27 +4,17 @@ import * as ng from './angular2'; // is not support by system builder. import * as router from './router'; -var angular: AngularOne = ng; -(window).angular = angular; +var _prevNg = (window).ng; -var _prevAngular = (window).angular; +(window).ng = ng; -angular.router = router; +(ng).router = router; /** * Calling noConflict will restore window.angular to its pre-angular loading state * and return the angular module object. */ -angular.noConflict = function() { - (window).angular = _prevAngular; - return angular; +(ng).noConflict = function() { + (window).ng = _prevNg; + return ng; }; - -interface AngularOne { - router: any; - noConflict(): any; -} - -interface AngularWindow extends Window { - angular: any; -}