Remove component resolver (#10858)

* refactor(core): remove deprecated ComponentResolver

BREAKING CHANGE: deprecated ComponentResolver was removed

Please follow deprecation instruction and migrate your code to use ComponentFactoryResolver.

* refactor(common): remove deprecated NgSwitchWhen directive

BREAKING CHANGE: previously deprecated NgSwitchWhen directive was removed, use NgSwitchCase instead
This commit is contained in:
Igor Minar
2016-08-16 16:48:32 -07:00
committed by vikerman
parent 9adf80385b
commit 73a9ee4a05
15 changed files with 62 additions and 186 deletions

View File

@ -9,7 +9,7 @@ import {
} from '@angular/testing/src/benchmark_util';
import {bootstrap} from '@angular/platform-browser';
import {Component} from '@angular/core';
import {NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from '@angular/common';
import {NgFor, NgSwitch, NgSwitchCase, NgSwitchDefault} from '@angular/common';
import {ApplicationRef} from '@angular/core/src/application_ref';
import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter';
@ -37,12 +37,12 @@ function setupReflector() {
reflector.registerGetters({
'benchmarktype': (o) => o.benchmarktype,
'switch': (o) => null,
'switchWhen': (o) => o.switchWhen
'switchCase': (o) => o.switchCase
});
reflector.registerSetters({
'benchmarktype': (o, v) => o.benchmarktype = v,
'switch': (o, v) => null,
'switchWhen': (o, v) => o.switchWhen = v
'switchCase': (o, v) => o.switchCase = v
});
}
@ -210,24 +210,24 @@ class CellData {
@Component({
selector: 'largetable',
inputs: ['data', 'benchmarkType'],
directives: [NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault],
directives: [NgFor, NgSwitch, NgSwitchCase, NgSwitchDefault],
template: `
<table [ngSwitch]="benchmarkType">
<tbody template="ngSwitchWhen 'interpolation'">
<tbody template="ngSwitchCase 'interpolation'">
<tr template="ngFor let row of data">
<td template="ngFor let column of row">
{{column.i}}:{{column.j}}|
</td>
</tr>
</tbody>
<tbody template="ngSwitchWhen 'interpolationAttr'">
<tbody template="ngSwitchCase 'interpolationAttr'">
<tr template="ngFor let row of data">
<td template="ngFor let column of row" attr.i="{{column.i}}" attr.j="{{column.j}}">
i,j attrs
</td>
</tr>
</tbody>
<tbody template="ngSwitchWhen 'interpolationFn'">
<tbody template="ngSwitchCase 'interpolationFn'">
<tr template="ngFor let row of data">
<td template="ngFor let column of row">
{{column.iFn()}}:{{column.jFn()}}|