fix(compiler): throw an error if variable with the same name is already defined. (#7209)

* fix(compiler): throw an error if variable with the same name is already defined. Closes #6492

* fix(compiler): Clean up formatting for issue #6492

* fix(compiler): throw an error if reference with the same name is already defined.

Closes #6492
This commit is contained in:
Andrii Nechytailov
2016-05-26 23:04:17 +03:00
committed by Miško Hevery
parent 263122ea5f
commit 9036f78b74
3 changed files with 40 additions and 5 deletions

View File

@ -1059,11 +1059,11 @@ class NeedsContentChildWithRead {
@Component({
selector: 'needs-view-children-read',
template: '<div #q text="va"></div><div #q text="vb"></div>',
template: '<div #q text="va"></div><div #w text="vb"></div>',
directives: [TextDirective]
})
class NeedsViewChildrenWithRead {
@ViewChildren('q', {read: TextDirective}) textDirChildren: QueryList<TextDirective>;
@ViewChildren('q,w', {read: TextDirective}) textDirChildren: QueryList<TextDirective>;
@ViewChildren('nonExisting', {read: TextDirective}) nonExistingVar: QueryList<TextDirective>;
}