fix(benchmark): change If for NgIf
This commit is contained in:
parent
c20060d259
commit
cdbb2473bb
|
@ -8,7 +8,7 @@ import {List, ListWrapper} from 'angular2/src/facade/collection';
|
|||
import {reflector} from 'angular2/src/reflection/reflection';
|
||||
import {ReflectionCapabilities} from 'angular2/src/reflection/reflection_capabilities';
|
||||
import {getIntParameter, bindAction} from 'angular2/src/test_lib/benchmark_util';
|
||||
import {If, NgFor} from 'angular2/directives';
|
||||
import {NgIf, NgFor} from 'angular2/directives';
|
||||
|
||||
// TODO(radokirov): Once the application is transpiled by TS instead of Traceur,
|
||||
// add those imports back into 'angular2/angular2';
|
||||
|
@ -54,7 +54,7 @@ export function main() {
|
|||
|
||||
@Component({selector: 'app'})
|
||||
@View({
|
||||
directives: [If, NgFor, DummyComponent, DummyDirective, DynamicDummy],
|
||||
directives: [NgIf, NgFor, DummyComponent, DummyDirective, DynamicDummy],
|
||||
template: `
|
||||
<div *ng-if="testingPlainComponents">
|
||||
<dummy *ng-for="#i of list"></dummy>
|
||||
|
|
|
@ -13,7 +13,7 @@ import {isPresent} from 'angular2/src/facade/lang';
|
|||
import {List} from 'angular2/src/facade/collection';
|
||||
import {window, document, gc} from 'angular2/src/facade/browser';
|
||||
import {getIntParameter, getStringParameter, bindAction} from 'angular2/src/test_lib/benchmark_util';
|
||||
import {If} from 'angular2/directives';
|
||||
import {NgIf} from 'angular2/directives';
|
||||
import {BrowserDomAdapter} from 'angular2/src/dom/browser_adapter';
|
||||
import {APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/compiler/view_pool';
|
||||
import {bind} from 'angular2/di';
|
||||
|
@ -245,8 +245,8 @@ class AppComponent {
|
|||
properties: {'data': 'data'}
|
||||
})
|
||||
@View({
|
||||
directives: [TreeComponent, If],
|
||||
template: `<span> {{data.value}} <span template='if data.right != null'><tree [data]='data.right'></tree></span><span template='if data.left != null'><tree [data]='data.left'></tree></span></span>`
|
||||
directives: [TreeComponent, NgIf],
|
||||
template: `<span> {{data.value}} <span template='ng-if data.right != null'><tree [data]='data.right'></tree></span><span template='ng-if data.left != null'><tree [data]='data.left'></tree></span></span>`
|
||||
})
|
||||
class TreeComponent {
|
||||
data:TreeNode;
|
||||
|
|
Loading…
Reference in New Issue