refactor: change provide(...) for {provide: ...}
- provide() is deprecated, - {} syntax is required by the offline compiler
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import {provide, Component, ComponentRef} from '@angular/core';
|
||||
import {Component, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser';
|
||||
import {
|
||||
CanActivate,
|
||||
@ -53,5 +53,5 @@ export class AppCmp {
|
||||
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/can_activate'})]);
|
||||
AppCmp, [{provide: APP_BASE_HREF, useValue: '/@angular/examples/router/ts/can_activate'}]);
|
||||
}
|
||||
|
@ -63,5 +63,5 @@ export class AppCmp {
|
||||
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/can_deactivate'})]);
|
||||
AppCmp, [{provide: APP_BASE_HREF, useValue: '/@angular/examples/router/ts/can_deactivate'}]);
|
||||
}
|
||||
|
@ -53,5 +53,5 @@ export class AppCmp {
|
||||
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/on_activate'})]);
|
||||
AppCmp, [{provide: APP_BASE_HREF, useValue: '/@angular/examples/router/ts/on_activate'}]);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Injectable, provide, ComponentRef} from '@angular/core';
|
||||
import {Component, Injectable, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser';
|
||||
import {
|
||||
OnDeactivate,
|
||||
@ -57,7 +57,7 @@ export class AppCmp {
|
||||
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(AppCmp, [
|
||||
provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/on_deactivate'}),
|
||||
{provide: APP_BASE_HREF, useValue: '/@angular/examples/router/ts/on_deactivate'},
|
||||
LogService
|
||||
]);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, provide, ComponentRef} from '@angular/core';
|
||||
import {Component, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser';
|
||||
import {
|
||||
RouteConfig,
|
||||
@ -53,5 +53,5 @@ export class AppCmp {
|
||||
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(AppCmp,
|
||||
[provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/reuse'})]);
|
||||
[{provide: APP_BASE_HREF, useValue: '/@angular/examples/router/ts/reuse'}]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user