From 15feb7c78a230db5565a9b9f3ce3760b6f9fb75b Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 28 Oct 2016 09:44:01 +0200 Subject: [PATCH] Add the container reference to the root component --- app/app.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/app.component.ts b/app/app.component.ts index 8d3cecd..1c02087 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component } from "@angular/core"; +import { Component, ViewContainerRef } from "@angular/core"; @Component({ moduleId: module.id, @@ -7,4 +7,11 @@ import { Component } from "@angular/core"; }) export class AppComponent { title = "Rubber Duck Booking Tool"; + + private viewContainerRef: ViewContainerRef; + + constructor(viewContainerRef: ViewContainerRef) { + // We need this little hack to use ng2-bootstrap. + this.viewContainerRef = viewContainerRef; + } }