chore: rename for to ng-for

Closes #1598
Closes #1295
Closes #1827

Closes #1827
This commit is contained in:
Misko Hevery
2015-05-11 17:04:55 -07:00
parent e9f236b70f
commit 111fa60a93
19 changed files with 66 additions and 58 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ import {Parent, Ancestor} from 'angular2/src/core/annotations_impl/visibility';
import {Attribute, Query} from 'angular2/src/core/annotations_impl/di';
import {NgIf} from 'angular2/src/directives/ng_if';
import {For} from 'angular2/src/directives/for';
import {NgFor} from '../../../src/directives/ng_for';
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
import {ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
@@ -1517,8 +1517,8 @@ class ToolbarPart {
selector: 'toolbar'
})
@View({
template: 'TOOLBAR(<div *for="var part of query" [toolbar-vc]="part"></div>)',
directives: [ToolbarViewContainer, For]
template: 'TOOLBAR(<div *ng-for="var part of query" [toolbar-vc]="part"></div>)',
directives: [ToolbarViewContainer, NgFor]
})
class ToolbarComponent {
query:QueryList;
@@ -17,7 +17,7 @@ import {TestBed} from 'angular2/src/test_lib/test_bed';
import {QueryList} from 'angular2/src/core/compiler/query_list';
import {Query} from 'angular2/src/core/annotations_impl/di';
import {NgIf, For} from 'angular2/angular2';
import {NgIf, NgFor} from 'angular2/angular2';
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@@ -66,7 +66,7 @@ export function main() {
it('should reflect moved directives', inject([TestBed, AsyncTestCompleter], (tb, async) => {
var template =
'<div text="1"></div>' +
'<needs-query text="2"><div *for="var i of list" [text]="i"></div></needs-query>' +
'<needs-query text="2"><div *ng-for="var i of list" [text]="i"></div></needs-query>' +
'<div text="4"></div>';
tb.createView(MyComp, {html: template}).then((view) => {
@@ -88,8 +88,8 @@ export function main() {
@Component({selector: 'needs-query'})
@View({
directives: [For],
template: '<div *for="var dir of query">{{dir.text}}|</div>'
directives: [NgFor],
template: '<div *ng-for="var dir of query">{{dir.text}}|</div>'
})
class NeedsQuery {
query: QueryList;
@@ -113,7 +113,7 @@ class TextDirective {
@Component({selector: 'my-comp'})
@View({
directives: [NeedsQuery, TextDirective, NgIf, For]
directives: [NeedsQuery, TextDirective, NgIf, NgFor]
})
class MyComp {
shouldShow: boolean;