diff --git a/components/dropdown/dropdown-toggle.directive.ts b/components/dropdown/dropdown-toggle.directive.ts index b6169464c1..7d667664b1 100644 --- a/components/dropdown/dropdown-toggle.directive.ts +++ b/components/dropdown/dropdown-toggle.directive.ts @@ -1,12 +1,12 @@ import { Directive, ElementRef, Host, HostBinding, HostListener, Input, OnInit } from '@angular/core'; -import { global } from '@angular/core/src/facade/lang'; +import { Type } from '@angular/core'; import { DropdownDirective } from './dropdown.directive'; /* tslint:disable */ -const MouseEvent = (global as any).MouseEvent as MouseEvent; +const MouseEvent = (Type as any).MouseEvent as MouseEvent; /* tslint:enable */ @Directive({ diff --git a/components/modal/modal.component.ts b/components/modal/modal.component.ts index 2801cc38b3..23ac5bc08c 100644 --- a/components/modal/modal.component.ts +++ b/components/modal/modal.component.ts @@ -15,7 +15,7 @@ import { Output, Renderer } from '@angular/core'; -import { global } from '@angular/core/src/facade/lang'; +import { Type } from '@angular/core'; import { ComponentsHelper } from '../utils/components-helper.service'; import { Utils } from '../utils/utils.class'; @@ -303,7 +303,7 @@ export class ModalDirective implements AfterViewInit, OnDestroy { private checkScrollbar():void { // this._isBodyOverflowing = document.body.clientWidth < window.innerWidth - this.isBodyOverflowing = this.document.body.clientWidth < (global as any).innerWidth; + this.isBodyOverflowing = this.document.body.clientWidth < (Type as any).innerWidth; this.scrollbarWidth = this.getScrollbarWidth(); } diff --git a/components/ng2-bootstrap-config.ts b/components/ng2-bootstrap-config.ts index 41b7968fc7..34079e51e6 100644 --- a/components/ng2-bootstrap-config.ts +++ b/components/ng2-bootstrap-config.ts @@ -1,5 +1,4 @@ -import { global } from '@angular/core/src/facade/lang'; - +import { Type } from '@angular/core'; export enum Ng2BootstrapTheme {BS3 = 1, BS4 = 2} export class Ng2BootstrapConfig { @@ -7,7 +6,7 @@ export class Ng2BootstrapConfig { public static get theme():Ng2BootstrapTheme { // hack as for now - if (global && (global as any).__theme === 'bs4') { + if (Type && (Type as any).__theme === 'bs4') { return Ng2BootstrapTheme.BS4; } return (this._theme || Ng2BootstrapTheme.BS3); diff --git a/components/rating/rating.component.ts b/components/rating/rating.component.ts index 2d0491eaaf..361d016244 100644 --- a/components/rating/rating.component.ts +++ b/components/rating/rating.component.ts @@ -1,11 +1,11 @@ import { Component, EventEmitter, HostListener, Input, OnInit, Output, Self } from '@angular/core'; -import { global } from '@angular/core/src/facade/lang'; +import { Type } from '@angular/core'; import { ControlValueAccessor, NgModel } from '@angular/forms'; /* tslint:disable */ -const KeyboardEvent = (global as any).KeyboardEvent as KeyboardEvent; +const KeyboardEvent = (Type as any).KeyboardEvent as KeyboardEvent; /* tslint:enable */ @Component({ diff --git a/components/typeahead/typeahead.directive.ts b/components/typeahead/typeahead.directive.ts index 81b98143b3..6e92986a8a 100644 --- a/components/typeahead/typeahead.directive.ts +++ b/components/typeahead/typeahead.directive.ts @@ -17,10 +17,10 @@ import 'rxjs/add/operator/map'; import 'rxjs/add/operator/mergeMap'; import 'rxjs/add/operator/toArray'; -import { global } from '@angular/core/src/facade/lang'; +import { Type } from '@angular/core'; import { ComponentsHelper } from '../utils/components-helper.service'; /* tslint:disable */ -const KeyboardEvent = (global as any).KeyboardEvent as KeyboardEvent; +const KeyboardEvent = (Type as any).KeyboardEvent as KeyboardEvent; /* tslint:enable */ @Directive({ diff --git a/components/utils/components-helper.service.ts b/components/utils/components-helper.service.ts index 3f0f950d89..c73ac51781 100644 --- a/components/utils/components-helper.service.ts +++ b/components/utils/components-helper.service.ts @@ -1,8 +1,7 @@ import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector, ReflectiveInjector, ViewContainerRef, - ResolvedReflectiveProvider + ResolvedReflectiveProvider, Type } from '@angular/core'; -import { ConcreteType, isPresent } from '@angular/core/src/facade/lang'; import { DOCUMENT } from '@angular/platform-browser'; /** @@ -62,12 +61,12 @@ export class ComponentsHelper { * @param providers - optional array of providers * @returns {ComponentRef} - returns ComponentRef */ - public appendNextToLocation(ComponentClass:ConcreteType, + public appendNextToLocation(ComponentClass:Type, location:ViewContainerRef, providers?:ResolvedReflectiveProvider[]):ComponentRef { let componentFactory = this.componentFactoryResolver.resolveComponentFactory(ComponentClass); let parentInjector = location.parentInjector; - let childInjector = isPresent(providers) && providers.length > 0 ? + let childInjector = providers !== undefined && providers.length > 0 ? ReflectiveInjector.fromResolvedProviders(providers, parentInjector) : parentInjector; return location.createComponent(componentFactory, location.length, childInjector); } @@ -82,7 +81,7 @@ export class ComponentsHelper { * @param contextInjector - injector to resolve root view container (any injector except root injector will fit) * @returns {ComponentRef} - returns ComponentRef */ - public appendNextToRoot(ComponentClass:ConcreteType, + public appendNextToRoot(ComponentClass:Type, ComponentOptionsClass:any, options:any, contextInjector:Injector):ComponentRef { diff --git a/components/utils/utils.class.ts b/components/utils/utils.class.ts index f18cd1361c..9410d03828 100644 --- a/components/utils/utils.class.ts +++ b/components/utils/utils.class.ts @@ -1,4 +1,4 @@ -import { global } from '@angular/core/src/facade/lang'; +import { Type } from '@angular/core'; export class Utils { public static reflow(element:any):void { @@ -13,7 +13,7 @@ export class Utils { let view = elem.ownerDocument.defaultView; if (!view || !view.opener) { - view = global; + view = Type; } return view.getComputedStyle(elem); diff --git a/demo/components/main-menu/main-menu.component.ts b/demo/components/main-menu/main-menu.component.ts index 46310d3ad8..a5d8fad773 100644 --- a/demo/components/main-menu/main-menu.component.ts +++ b/demo/components/main-menu/main-menu.component.ts @@ -3,15 +3,13 @@ import { NavigationEnd, Router } from '@angular/router'; import { Ng2BootstrapConfig, Ng2BootstrapTheme } from '../../../components/ng2-bootstrap-config'; import { routes } from './../../router.config'; -import { SearchFilterPipe } from './search-filter.pipe'; // webpack html imports let template = require('./main-menu.template.html'); @Component({ selector: 'main-menu', - template, - pipes: [SearchFilterPipe] + template }) export class MainMenuComponent { diff --git a/demo/ng2-bootstrap-demo.module.ts b/demo/ng2-bootstrap-demo.module.ts index a05a004717..b44279ddae 100644 --- a/demo/ng2-bootstrap-demo.module.ts +++ b/demo/ng2-bootstrap-demo.module.ts @@ -25,6 +25,7 @@ import { import { DemoSectionComponent } from './components/demo-section'; import { GettingStartedSectionComponent } from './components/getting-started/getting-started'; import { MainMenuComponent } from './components/main-menu/main-menu.component'; +import { SearchFilterPipe } from './components/main-menu/search-filter.pipe'; import { TopMenuComponent } from './components/top-menu/top-menu.component'; import { DemoComponent } from './app.component'; @@ -53,6 +54,7 @@ import { TypeaheadSectionComponent } from './components/typeahead-section'; GettingStartedSectionComponent, MainMenuComponent, TopMenuComponent, + SearchFilterPipe, AccordionDemoComponent, AlertDemoComponent, diff --git a/package.json b/package.json index 8acc635a38..3ddbb4dd21 100644 --- a/package.json +++ b/package.json @@ -53,19 +53,19 @@ "moment": "2.14.1" }, "peerDependencies": { - "@angular/common": "2.0.0-rc.5", - "@angular/compiler": "2.0.0-rc.5", - "@angular/core": "2.0.0-rc.5", - "@angular/forms": "0.3.0" + "@angular/common": "2.0.0-rc.6", + "@angular/compiler": "2.0.0-rc.6", + "@angular/core": "2.0.0-rc.6", + "@angular/forms": "2.0.0-rc.6" }, "devDependencies": { - "@angular/common": "2.0.0-rc.5", - "@angular/compiler": "2.0.0-rc.5", - "@angular/core": "2.0.0-rc.5", - "@angular/forms": "0.3.0", - "@angular/platform-browser": "2.0.0-rc.5", - "@angular/platform-browser-dynamic": "2.0.0-rc.5", - "@angular/router": "3.0.0-rc.1", + "@angular/common": "2.0.0-rc.6", + "@angular/compiler": "2.0.0-rc.6", + "@angular/core": "2.0.0-rc.6", + "@angular/forms": "2.0.0-rc.6", + "@angular/platform-browser": "2.0.0-rc.6", + "@angular/platform-browser-dynamic": "2.0.0-rc.6", + "@angular/router": "3.0.0-rc.2", "async": "2.0.1", "bootstrap": "3.3.7", "codecov": "1.0.1", @@ -91,11 +91,11 @@ "reflect-metadata": "0.1.8", "require-dir": "0.3.0", "rxjs": "5.0.0-beta.11", - "systemjs-builder": "0.15.29", + "systemjs-builder": "0.15.30", "tslint-config-valorsoft": "1.1.1", "typedoc": "0.4.5", "typescript": "1.8.10", - "typings": "1.3.2", + "typings": "1.3.3", "zone.js": "0.6.17" } }