X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fdevel%2Fdevel.component.ts;h=eda03eff7fbc28ba9a1713eaa02f45c84d309cd8;hb=fb2f6b918beb0a994ad304bfd678ef0c5c562210;hp=5c8b9f2c778c0a42a0208cc60bdb0fada2cf4f15;hpb=c51d5034d527578da70bdd41b9ce13f28455c598;p=src%2Fxds%2Fxds-agent.git diff --git a/webapp/src/app/devel/devel.component.ts b/webapp/src/app/devel/devel.component.ts index 5c8b9f2..eda03ef 100644 --- a/webapp/src/app/devel/devel.component.ts +++ b/webapp/src/app/devel/devel.component.ts @@ -1,17 +1,16 @@ -import { Component } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { Observable } from 'rxjs/Observable'; -import { Observable } from 'rxjs'; - -import { ProjectService, IProject } from "../services/project.service"; +import { ProjectService, IProject } from '../services/project.service'; @Component({ - selector: 'devel', - moduleId: module.id, + selector: 'xds-devel', templateUrl: './devel.component.html', styleUrls: ['./devel.component.css'], + encapsulation: ViewEncapsulation.None }) -export class DevelComponent { +export class DevelComponent implements OnInit { curPrj: IProject; Prjs$: Observable; @@ -23,7 +22,7 @@ export class DevelComponent { this.Prjs$ = this.projectSvr.Projects$; this.Prjs$.subscribe((prjs) => { // Select project if no one is selected or no project exists - if (this.curPrj && "id" in this.curPrj) { + if (this.curPrj && 'id' in this.curPrj) { this.curPrj = prjs.find(p => p.id === this.curPrj.id) || prjs[0]; } else if (this.curPrj == null) { this.curPrj = prjs[0];