diff --git a/package-lock.json b/package-lock.json index 50753694b051..493fcac9418a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,17 +27,13 @@ } }, "@angular/animations": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-beta.7.tgz", - "integrity": "sha512-qN0tutsUEd72O2Sx9wrZq0q+jGY/FaxSkAV9UWe2Py2IqwVlpYqcoXwyP0oZydNhzltMzPgpEwgYGdrN8MxxWA==", + "version": "git+ssh://git@github.com/angular/animations-builds.git#765cb96f8854ed70b98ab2d1a129044729c418d5", "requires": { "tslib": "1.9.0" } }, "@angular/bazel": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/bazel/-/bazel-6.0.0-beta.7.tgz", - "integrity": "sha512-q+QSsvX1u6GrQYhjY1hSmHGt8lmxTUqmjzzpJm4vgjKmdwvpWLSsKGHKHVK5B6G1LBGVLivHXFhQnnQrkXvhuQ==", + "version": "git+ssh://git@github.com/angular/bazel-builds.git#2d9eae19350b0f84445db8794927fe11b5635a7d", "dev": true, "requires": { "@bazel/typescript": "0.11.1", @@ -81,25 +77,19 @@ } }, "@angular/common": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-beta.7.tgz", - "integrity": "sha512-P8Fy9zytRJF3TgRQW8K8sGqye+wMCOCkRaoTnAtHhLduMbnaliQDLX9wUEQF7ifYs1xMJfzzpEtXsJcQsfmWrw==", + "version": "git+ssh://git@github.com/angular/common-builds.git#2fca9bd9bd25a51e3d8bc094c4e43818ad0d287a", "requires": { "tslib": "1.9.0" } }, "@angular/compiler": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-beta.7.tgz", - "integrity": "sha512-uI1+D95lgDZKdTNhmWkt8Wj0Z3pyOhvzdcqmj9vaC6d2BlhLJ+ZAGn/aMkjJr8nBV/BEemI2zsFKL4Wv3MSIqQ==", + "version": "git+ssh://git@github.com/angular/compiler-builds.git#b15b466887dcc5bde1e1059672335c99cd71a158", "requires": { "tslib": "1.9.0" } }, "@angular/compiler-cli": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-beta.7.tgz", - "integrity": "sha512-7ass+K6BZTOL+NqAIfqutqR0C+JbF+TvSz3LjEQyjrL6iafnVAXsNk5qFG7kmskvLLWfk7155/wOOxn9MqMnVg==", + "version": "git+ssh://git@github.com/angular/compiler-cli-builds.git#dcd73c730cb75c605b566c1fa86eda3c404fe3f2", "dev": true, "requires": { "chokidar": "1.7.0", @@ -138,51 +128,39 @@ } }, "@angular/core": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-beta.7.tgz", - "integrity": "sha512-UbizfRQds2KShhoypqvvo86iQWct+jq63lc4HiTL5UCkcYMYTf9/KBJo2G3DMzNimICcy9dMLN+LCh297d+OZw==", + "version": "git+ssh://git@github.com/angular/core-builds.git#a67d95c73755e3eb1a28903cc4236f8893613cb9", "requires": { "tslib": "1.9.0" } }, "@angular/forms": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-6.0.0-beta.7.tgz", - "integrity": "sha512-heCfQZdqP+CT6eWefYxKBFaPFz+B44vaaH0FcUnCutPMrbQjczhVI/2pWx6tW6ovnOqp9U4/4iF8/y9pEggGLQ==", + "version": "git+ssh://git@github.com/angular/forms-builds.git#d69583b49bf48006d12cfdb29a20ccb35e635e3a", "requires": { "tslib": "1.9.0" } }, "@angular/http": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-beta.7.tgz", - "integrity": "sha512-Zj4UNEDP0TRrX5+olwjmQ5Zp3gaQAap2nncaBf9unrR3gjG/kU06ryl60ovjku8PLsCvxrrkJbcxuIIc6YpYdA==", + "version": "git+ssh://git@github.com/angular/http-builds.git#d243ce4d95922cd4bc524769ed3859269257f7e7", "dev": true, "requires": { "tslib": "1.9.0" } }, "@angular/platform-browser": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-beta.7.tgz", - "integrity": "sha512-RyotvV4ms5PYYt9jqogStjBLqq8MGTSA3rcmrFjx6rZgGg7+knNQSKNKNNt5ijklxLHhUHfnvkGaY3g9QJWMnw==", + "version": "git+ssh://git@github.com/angular/platform-browser-builds.git#ac538e0034a964b64528b616867aeadace87a67e", "requires": { "tslib": "1.9.0" } }, "@angular/platform-browser-dynamic": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-beta.7.tgz", - "integrity": "sha512-On9EJNoW7z5OOwkd+ob6PgaEITA81OsCUF3NJwexlpJPDuvMz9libATnuzoW+X44bJT3Y6FF9TCB0tldF7335Q==", + "version": "git+ssh://git@github.com/angular/platform-browser-dynamic-builds.git#8ca967730b510924d28012e5159ebc06d492d23e", "dev": true, "requires": { "tslib": "1.9.0" } }, "@angular/platform-server": { - "version": "6.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-beta.7.tgz", - "integrity": "sha512-UafKXP5jqbsXNHNG9H4E0SI0GySog06pnvCHoqa7veV6VMaMup2sjwjXFt3E2AnS9fpzGOJckeZr+CwpnqpflA==", + "version": "git+ssh://git@github.com/angular/platform-server-builds.git#f55b3d91f1b39c987298fe43c0d9eac3538adc9e", "dev": true, "requires": { "domino": "2.0.1", @@ -2781,6 +2759,14 @@ "dev": true, "requires": { "typescript": "2.6.2" + }, + "dependencies": { + "typescript": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "dev": true + } } }, "@types/chalk": { @@ -6984,7 +6970,7 @@ "resolve-dependency-path": "1.0.2", "sass-lookup": "1.1.0", "stylus-lookup": "1.0.2", - "typescript": "2.6.2" + "typescript": "2.7.2" }, "dependencies": { "debug": { @@ -20985,9 +20971,9 @@ "dev": true }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true }, "typescript-eslint-parser": { diff --git a/package.json b/package.json index dee2fe805ad9..2ab5f6066dd6 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,12 @@ "node": ">= 5.4.1" }, "dependencies": { - "@angular/animations": ">=6.0.0-beta.7 <7.0.0", - "@angular/common": ">=6.0.0-beta.7 <7.0.0", - "@angular/compiler": ">=6.0.0-beta.7 <7.0.0", - "@angular/core": ">=6.0.0-beta.7 <7.0.0", - "@angular/forms": ">=6.0.0-beta.7 <7.0.0", - "@angular/platform-browser": ">=6.0.0-beta.7 <7.0.0", + "@angular/animations": "git@github.com:angular/animations-builds#6.0.0-beta.7+112431d", + "@angular/common": "git@github.com:angular/common-builds#6.0.0-beta.7+112431d", + "@angular/compiler": "git@github.com:angular/compiler-builds#6.0.0-beta.7+112431d", + "@angular/core": "git@github.com:angular/core-builds#6.0.0-beta.7+112431d", + "@angular/forms": "git@github.com:angular/forms-builds#6.0.0-beta.7+112431d", + "@angular/platform-browser": "git@github.com:angular/platform-browser-builds#6.0.0-beta.7+112431d", "core-js": "^2.4.1", "rxjs": "^5.5.7", "systemjs": "0.19.43", @@ -42,11 +42,11 @@ "devDependencies": { "@angular-devkit/core": "^0.4.5", "@angular-devkit/schematics": "^0.4.5", - "@angular/bazel": ">=6.0.0-beta.7 <7.0.0", - "@angular/compiler-cli": ">=6.0.0-beta.7 <7.0.0", - "@angular/http": ">=6.0.0-beta.7 <7.0.0", - "@angular/platform-browser-dynamic": ">=6.0.0-beta.7 <7.0.0", - "@angular/platform-server": ">=6.0.0-beta.7 <7.0.0", + "@angular/bazel": "git@github.com:angular/bazel-builds#6.0.0-beta.7+112431d", + "@angular/compiler-cli": "git@github.com:angular/compiler-cli-builds#6.0.0-beta.7+112431d", + "@angular/http": "git@github.com:angular/http-builds#6.0.0-beta.7+112431d", + "@angular/platform-browser-dynamic": "git@github.com:angular/platform-browser-dynamic-builds#6.0.0-beta.7+112431d", + "@angular/platform-server": "git@github.com:angular/platform-server-builds#6.0.0-beta.7+112431d", "@angular/router": ">=6.0.0-beta.7 <7.0.0", "@angular/upgrade": "^5.0.1", "@bazel/ibazel": "0.3.1", @@ -126,7 +126,7 @@ "tsconfig-paths": "^2.3.0", "tslint": "^5.9.1", "tsutils": "^2.6.0", - "typescript": "~2.6.0", + "typescript": "~2.7.0", "uglify-js": "^2.8.14", "web-animations-js": "^2.2.5" } diff --git a/src/cdk/a11y/aria-describer/aria-describer.ts b/src/cdk/a11y/aria-describer/aria-describer.ts index 3a43d5a33d0e..be9066e3b119 100644 --- a/src/cdk/a11y/aria-describer/aria-describer.ts +++ b/src/cdk/a11y/aria-describer/aria-describer.ts @@ -8,7 +8,6 @@ import {DOCUMENT} from '@angular/common'; import { - APP_ROOT_SCOPE, Inject, Injectable, InjectionToken, @@ -54,7 +53,7 @@ let messagesContainer: HTMLElement | null = null; * content. * @docs-private */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class AriaDescriber { private _document: Document; diff --git a/src/cdk/a11y/focus-monitor/focus-monitor.ts b/src/cdk/a11y/focus-monitor/focus-monitor.ts index ba6c3c4a8f51..ff8be7ce1425 100644 --- a/src/cdk/a11y/focus-monitor/focus-monitor.ts +++ b/src/cdk/a11y/focus-monitor/focus-monitor.ts @@ -8,7 +8,6 @@ import {Platform, supportsPassiveEventListeners} from '@angular/cdk/platform'; import { - APP_ROOT_SCOPE, Directive, ElementRef, EventEmitter, @@ -41,7 +40,7 @@ type MonitoredElementInfo = { /** Monitors mouse and keyboard events to determine the cause of focus events. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class FocusMonitor implements OnDestroy { /** The focus origin that the next focus event is a result of. */ private _origin: FocusOrigin = null; diff --git a/src/cdk/a11y/focus-trap/focus-trap.ts b/src/cdk/a11y/focus-trap/focus-trap.ts index e78136e84dcf..170f8b621de3 100644 --- a/src/cdk/a11y/focus-trap/focus-trap.ts +++ b/src/cdk/a11y/focus-trap/focus-trap.ts @@ -10,7 +10,6 @@ import {coerceBooleanProperty} from '@angular/cdk/coercion'; import {DOCUMENT} from '@angular/common'; import { AfterContentInit, - APP_ROOT_SCOPE, Directive, ElementRef, Inject, @@ -279,7 +278,7 @@ export class FocusTrap { /** Factory that allows easy instantiation of focus traps. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class FocusTrapFactory { private _document: Document; diff --git a/src/cdk/a11y/interactivity-checker/interactivity-checker.ts b/src/cdk/a11y/interactivity-checker/interactivity-checker.ts index e5f7b10e6fb0..c66f48f304ff 100644 --- a/src/cdk/a11y/interactivity-checker/interactivity-checker.ts +++ b/src/cdk/a11y/interactivity-checker/interactivity-checker.ts @@ -7,7 +7,7 @@ */ import {Platform} from '@angular/cdk/platform'; -import {APP_ROOT_SCOPE, Injectable} from '@angular/core'; +import {Injectable} from '@angular/core'; // The InteractivityChecker leans heavily on the ally.js accessibility utilities. @@ -18,7 +18,7 @@ import {APP_ROOT_SCOPE, Injectable} from '@angular/core'; * Utility for checking the interactivity of an element, such as whether is is focusable or * tabbable. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class InteractivityChecker { constructor(private _platform: Platform) {} diff --git a/src/cdk/a11y/live-announcer/live-announcer-token.ts b/src/cdk/a11y/live-announcer/live-announcer-token.ts index 9c55c1eaa4ed..f57231e91599 100644 --- a/src/cdk/a11y/live-announcer/live-announcer-token.ts +++ b/src/cdk/a11y/live-announcer/live-announcer-token.ts @@ -6,13 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import {APP_ROOT_SCOPE, InjectionToken} from '@angular/core'; +import {InjectionToken} from '@angular/core'; // The token for the live announcer element is defined in a separate file from LiveAnnouncer // as a workaround for https://github.com/angular/angular/issues/22559 export const LIVE_ANNOUNCER_ELEMENT_TOKEN = new InjectionToken('liveAnnouncerElement', { - scope: APP_ROOT_SCOPE, + providedIn: 'root', factory: () => null, }); diff --git a/src/cdk/a11y/live-announcer/live-announcer.ts b/src/cdk/a11y/live-announcer/live-announcer.ts index f22245858612..d423bb098f13 100644 --- a/src/cdk/a11y/live-announcer/live-announcer.ts +++ b/src/cdk/a11y/live-announcer/live-announcer.ts @@ -8,7 +8,6 @@ import {DOCUMENT} from '@angular/common'; import { - APP_ROOT_SCOPE, Inject, Injectable, OnDestroy, @@ -22,7 +21,7 @@ import {LIVE_ANNOUNCER_ELEMENT_TOKEN} from './live-announcer-token'; /** Possible politeness levels. */ export type AriaLivePoliteness = 'off' | 'polite' | 'assertive'; -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class LiveAnnouncer implements OnDestroy { private readonly _liveElement: Element; diff --git a/src/cdk/bidi/dir-document-token.ts b/src/cdk/bidi/dir-document-token.ts index b2969a8844ca..21cb6111fd47 100644 --- a/src/cdk/bidi/dir-document-token.ts +++ b/src/cdk/bidi/dir-document-token.ts @@ -7,7 +7,7 @@ */ import {DOCUMENT} from '@angular/common'; -import {APP_ROOT_SCOPE, inject, InjectionToken} from '@angular/core'; +import {inject, InjectionToken} from '@angular/core'; /** @@ -26,6 +26,6 @@ import {APP_ROOT_SCOPE, inject, InjectionToken} from '@angular/core'; * @docs-private */ export const DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', { - scope: APP_ROOT_SCOPE, + providedIn: 'root', factory: () => inject(DOCUMENT), }); diff --git a/src/cdk/bidi/directionality.ts b/src/cdk/bidi/directionality.ts index 6c33dc686521..8963dc07eff4 100644 --- a/src/cdk/bidi/directionality.ts +++ b/src/cdk/bidi/directionality.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {APP_ROOT_SCOPE, EventEmitter, Inject, Injectable, Optional} from '@angular/core'; +import {EventEmitter, Inject, Injectable, Optional} from '@angular/core'; import {DIR_DOCUMENT} from './dir-document-token'; @@ -17,7 +17,7 @@ export type Direction = 'ltr' | 'rtl'; * The directionality (LTR / RTL) context for the application (or a subtree of it). * Exposes the current direction and a stream of direction changes. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class Directionality { /** The current 'ltr' or 'rtl' value. */ readonly value: Direction = 'ltr'; diff --git a/src/cdk/collections/unique-selection-dispatcher.ts b/src/cdk/collections/unique-selection-dispatcher.ts index 3c51de3d8527..e5051b255d2f 100644 --- a/src/cdk/collections/unique-selection-dispatcher.ts +++ b/src/cdk/collections/unique-selection-dispatcher.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {APP_ROOT_SCOPE, Injectable, OnDestroy} from '@angular/core'; +import {Injectable, OnDestroy} from '@angular/core'; // Users of the Dispatcher never need to see this type, but TypeScript requires it to be exported. @@ -21,7 +21,7 @@ export type UniqueSelectionDispatcherListener = (id: string, name: string) => vo * This service does not *store* any IDs and names because they may change at any time, so it is * less error-prone if they are simply passed through when the events occur. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class UniqueSelectionDispatcher implements OnDestroy { private _listeners: UniqueSelectionDispatcherListener[] = []; diff --git a/src/cdk/observers/observe-content.ts b/src/cdk/observers/observe-content.ts index 6a0d1e866e81..cacbd803db82 100644 --- a/src/cdk/observers/observe-content.ts +++ b/src/cdk/observers/observe-content.ts @@ -9,7 +9,6 @@ import {coerceBooleanProperty} from '@angular/cdk/coercion'; import { AfterContentInit, - APP_ROOT_SCOPE, Directive, ElementRef, EventEmitter, @@ -30,7 +29,7 @@ import {Subject} from 'rxjs/Subject'; * Factory that creates a new MutationObserver and allows us to stub it out in unit tests. * @docs-private */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class MutationObserverFactory { create(callback: MutationCallback): MutationObserver | null { return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback); diff --git a/src/cdk/overlay/keyboard/overlay-keyboard-dispatcher.ts b/src/cdk/overlay/keyboard/overlay-keyboard-dispatcher.ts index 86a106eb807e..983be9276492 100644 --- a/src/cdk/overlay/keyboard/overlay-keyboard-dispatcher.ts +++ b/src/cdk/overlay/keyboard/overlay-keyboard-dispatcher.ts @@ -8,7 +8,6 @@ import {DOCUMENT} from '@angular/common'; import { - APP_ROOT_SCOPE, Inject, Injectable, InjectionToken, @@ -24,7 +23,7 @@ import {OverlayRef} from '../overlay-ref'; * if any. It maintains a list of attached overlays to determine best suited overlay based * on event target and order of overlay opens. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class OverlayKeyboardDispatcher implements OnDestroy { /** Currently attached overlays in the order they were attached. */ diff --git a/src/cdk/overlay/overlay-container.ts b/src/cdk/overlay/overlay-container.ts index c20ddd9e0d62..3598f500896b 100644 --- a/src/cdk/overlay/overlay-container.ts +++ b/src/cdk/overlay/overlay-container.ts @@ -8,7 +8,6 @@ import {DOCUMENT} from '@angular/common'; import { - APP_ROOT_SCOPE, Inject, Injectable, InjectionToken, @@ -19,7 +18,7 @@ import { /** Container inside which all overlays will render. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class OverlayContainer implements OnDestroy { protected _containerElement: HTMLElement; diff --git a/src/cdk/overlay/overlay-directives.ts b/src/cdk/overlay/overlay-directives.ts index 4cb5122a9105..a6c0df0c68c5 100644 --- a/src/cdk/overlay/overlay-directives.ts +++ b/src/cdk/overlay/overlay-directives.ts @@ -12,7 +12,6 @@ import {ESCAPE} from '@angular/cdk/keycodes'; import {TemplatePortal} from '@angular/cdk/portal'; import {ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling'; import { - APP_ROOT_SCOPE, Directive, ElementRef, EventEmitter, @@ -76,7 +75,7 @@ const defaultPositionList: ConnectedPosition[] = [ /** Injection token that determines the scroll handling while the connected overlay is open. */ export const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>('cdk-connected-overlay-scroll-strategy', { - scope: APP_ROOT_SCOPE, + providedIn: 'root', factory: () => { // Store the injected deps here because we can't use the `inject` function outside // this function's context (including the inner function). diff --git a/src/cdk/overlay/position/overlay-position-builder.ts b/src/cdk/overlay/position/overlay-position-builder.ts index c3bd3dd0f28c..54d1d6a26616 100644 --- a/src/cdk/overlay/position/overlay-position-builder.ts +++ b/src/cdk/overlay/position/overlay-position-builder.ts @@ -8,7 +8,7 @@ import {ViewportRuler} from '@angular/cdk/scrolling'; import {DOCUMENT} from '@angular/common'; -import {APP_ROOT_SCOPE, ElementRef, Inject, Injectable} from '@angular/core'; +import {ElementRef, Inject, Injectable} from '@angular/core'; import {OriginConnectionPosition, OverlayConnectionPosition} from './connected-position'; import {ConnectedPositionStrategy} from './connected-position-strategy'; import {FlexibleConnectedPositionStrategy} from './flexible-connected-position-strategy'; @@ -16,7 +16,7 @@ import {GlobalPositionStrategy} from './global-position-strategy'; /** Builder for overlay position strategy. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class OverlayPositionBuilder { constructor( private _viewportRuler: ViewportRuler, diff --git a/src/cdk/overlay/scroll/scroll-strategy-options.ts b/src/cdk/overlay/scroll/scroll-strategy-options.ts index 536a73b194d2..26d1b3d4ba0e 100644 --- a/src/cdk/overlay/scroll/scroll-strategy-options.ts +++ b/src/cdk/overlay/scroll/scroll-strategy-options.ts @@ -8,7 +8,7 @@ import {ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling'; import {DOCUMENT} from '@angular/common'; -import {APP_ROOT_SCOPE, Inject, Injectable, NgZone} from '@angular/core'; +import {Inject, Injectable, NgZone} from '@angular/core'; import {BlockScrollStrategy} from './block-scroll-strategy'; import {CloseScrollStrategy, CloseScrollStrategyConfig} from './close-scroll-strategy'; import {NoopScrollStrategy} from './noop-scroll-strategy'; @@ -24,7 +24,7 @@ import { * Users can provide a custom value for `ScrollStrategyOptions` to replace the default * behaviors. This class primarily acts as a factory for ScrollStrategy instances. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class ScrollStrategyOptions { private _document: Document; diff --git a/src/cdk/platform/platform.ts b/src/cdk/platform/platform.ts index 9a719dab63fa..446040f4d9d6 100755 --- a/src/cdk/platform/platform.ts +++ b/src/cdk/platform/platform.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {APP_ROOT_SCOPE, Injectable} from '@angular/core'; +import {Injectable} from '@angular/core'; // Whether the current platform supports the V8 Break Iterator. The V8 check @@ -17,7 +17,7 @@ const hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8Break * Service to detect the current platform by comparing the userAgent strings and * checking browser-specific global properties. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class Platform { /** Whether the Angular application is being rendered in the browser. */ isBrowser: boolean = typeof document === 'object' && !!document; diff --git a/src/cdk/scrolling/scroll-dispatcher.ts b/src/cdk/scrolling/scroll-dispatcher.ts index 25208f4c88f2..436a48f5110b 100644 --- a/src/cdk/scrolling/scroll-dispatcher.ts +++ b/src/cdk/scrolling/scroll-dispatcher.ts @@ -8,7 +8,6 @@ import {Platform} from '@angular/cdk/platform'; import { - APP_ROOT_SCOPE, ElementRef, Injectable, NgZone, @@ -33,7 +32,7 @@ export const DEFAULT_SCROLL_TIME = 20; * Service contained all registered Scrollable references and emits an event when any one of the * Scrollable references emit a scrolled event. */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class ScrollDispatcher implements OnDestroy { constructor(private _ngZone: NgZone, private _platform: Platform) { } diff --git a/src/cdk/scrolling/viewport-ruler.ts b/src/cdk/scrolling/viewport-ruler.ts index 81d1b8e4da63..1200ac3d5360 100644 --- a/src/cdk/scrolling/viewport-ruler.ts +++ b/src/cdk/scrolling/viewport-ruler.ts @@ -7,7 +7,7 @@ */ import {Platform} from '@angular/cdk/platform'; -import {APP_ROOT_SCOPE, Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core'; +import {Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {fromEvent} from 'rxjs/observable/fromEvent'; import {merge} from 'rxjs/observable/merge'; @@ -23,7 +23,7 @@ export const DEFAULT_RESIZE_TIME = 20; * Simple utility for getting the bounds of the browser viewport. * @docs-private */ -@Injectable({scope: APP_ROOT_SCOPE}) +@Injectable({providedIn: 'root'}) export class ViewportRuler implements OnDestroy { /** Cached viewport dimensions. */ private _viewportSize: {width: number; height: number};