parent
d38689677c
commit
dea6a4593b
|
@ -1701,7 +1701,7 @@ export function main() {
|
|||
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
|
||||
tcb.overrideView(MyComp, new ViewMetadata({
|
||||
template: '<component-with-template></component-with-template>',
|
||||
directives: [ComponentWithTempalte]
|
||||
directives: [ComponentWithTemplate]
|
||||
}))
|
||||
.createAsync(MyComp)
|
||||
.then((rootTC) => {
|
||||
|
@ -2270,7 +2270,7 @@ class DirectiveThrowingAnError {
|
|||
selector: 'component-with-template',
|
||||
directives: [NgFor], template: `No View Decorator: <div *ng-for="#item of items">{{item}}</div>`
|
||||
})
|
||||
class ComponentWithTempalte {
|
||||
class ComponentWithTemplate {
|
||||
items = [1, 2, 3];
|
||||
}
|
||||
|
||||
|
|
|
@ -26,15 +26,15 @@ class ComponentWithTemplate {
|
|||
class ComponentWithViewTemplate {
|
||||
}
|
||||
|
||||
@Component({selector: 'sample'})
|
||||
class ComponentWithoutView {
|
||||
}
|
||||
|
||||
@Component({selector: 'sample', templateUrl: "some template url"})
|
||||
@View({template: "some template"})
|
||||
class ComponentWithViewTemplateUrl {
|
||||
}
|
||||
|
||||
@Component({selector: 'sample'})
|
||||
class ComponentWithoutView {
|
||||
}
|
||||
|
||||
@View({template: "some template"})
|
||||
class ClassWithView {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {ElementRef, Component, Directive, View, Injectable} from 'angular2/core';
|
||||
import {ElementRef, Component, Directive, Injectable} from 'angular2/core';
|
||||
import {Renderer} from 'angular2/render';
|
||||
|
||||
export function main() {
|
||||
|
|
|
@ -195,7 +195,6 @@ class _DirectiveDependenciesVisitor extends Object
|
|||
/// reflector.
|
||||
@override
|
||||
Object visitInstanceCreationExpression(InstanceCreationExpression node) {
|
||||
// if (_isViewAnnotation(node)) {
|
||||
if (_isViewAnnotation(node) || _isComponentAnnotation(node)) {
|
||||
compileData = new NormalizedComponentWithViewDirectives(
|
||||
null, <CompileDirectiveMetadata>[]);
|
||||
|
|
Loading…
Reference in New Issue