diff --git a/components/accordion/accordion.ts b/components/accordion/accordion.ts index b94d492570..cbb69a193a 100644 --- a/components/accordion/accordion.ts +++ b/components/accordion/accordion.ts @@ -3,7 +3,7 @@ import { Component, View, Directive, OnInit, OnDestroy, - NgClass, ViewContainerRef, TemplateRef + NgClass, ViewContainerRef, TemplateRef, Inject } from 'angular2/angular2'; // todo: support template url @@ -56,7 +56,7 @@ export class Accordion { export class AccordionTransclude implements OnInit{ private accordionTransclude:TemplateRef; - constructor(private viewRef:ViewContainerRef) { + constructor(@Inject(ViewContainerRef) private viewRef:ViewContainerRef) { } onInit() { diff --git a/components/common.ts b/components/common.ts index 779f4a92e7..bfbd395cd9 100644 --- a/components/common.ts +++ b/components/common.ts @@ -1,13 +1,12 @@ /// - -import {Directive, TemplateRef, ViewContainerRef} from 'angular2/angular2'; +import {Directive, TemplateRef, ViewContainerRef, Inject} from 'angular2/angular2'; @Directive({ selector: '[ng-transclude]', properties: ['ngTransclude'] }) export class NgTransclude { - private _ngTransclude:any; + private _ngTransclude: TemplateRef; private set ngTransclude(templateRef:TemplateRef) { this._ngTransclude = templateRef; @@ -20,6 +19,6 @@ export class NgTransclude { return this._ngTransclude; } - constructor(public viewRef:ViewContainerRef) { + constructor(@Inject(ViewContainerRef) public viewRef:ViewContainerRef) { } } diff --git a/components/typeahead/typeahead.ts b/components/typeahead/typeahead.ts index 9c5f41577f..739d5504c3 100644 --- a/components/typeahead/typeahead.ts +++ b/components/typeahead/typeahead.ts @@ -178,8 +178,7 @@ export class TypeaheadContainer { events: ['typeaheadLoading', 'typeaheadNoResults', 'typeaheadOnSelect'], host: { '(keyup)': 'onChange($event)' - }, - directives: [CORE_DIRECTIVES, TypeaheadContainer] + } }) export class Typeahead implements OnInit{ public typeaheadLoading:EventEmitter = new EventEmitter();