diff options
author | 2018-07-10 15:57:37 +0300 | |
---|---|---|
committer | 2018-07-10 15:57:37 +0300 | |
commit | ff76b5ed0aa91d5fdf9dc4f95e8b20f91ed9d072 (patch) | |
tree | aae42404a93fdffdd16ff050eaa28129959f7577 /vid-webpack-master/src/app/home | |
parent | c72d565bb58226b20625b2bce5f0019046bee649 (diff) |
New Angular UI from 1806
Change-Id: I39c160db0e0a6ec2e587ccf007ee1b23c6a08666
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/home')
4 files changed, 50 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/home/home.component.e2e-spec.js b/vid-webpack-master/src/app/home/home.component.e2e-spec.js new file mode 100644 index 00000000..41203f9d --- /dev/null +++ b/vid-webpack-master/src/app/home/home.component.e2e-spec.js @@ -0,0 +1,13 @@ +describe('Home', function () { + + beforeEach(function () { + browser.get('/'); + }); + + it('should have <my-home>', function () { + var home = element(by.css('vid-app my-home')); + expect(home.isPresent()).toEqual(true); + expect(home.getText()).toEqual("Home Works!"); + }); + +}); diff --git a/vid-webpack-master/src/app/home/home.component.html b/vid-webpack-master/src/app/home/home.component.html new file mode 100644 index 00000000..604d9e1d --- /dev/null +++ b/vid-webpack-master/src/app/home/home.component.html @@ -0,0 +1,3 @@ +<p> + Home Works! +</p> diff --git a/vid-webpack-master/src/app/home/home.component.scss b/vid-webpack-master/src/app/home/home.component.scss new file mode 100644 index 00000000..5db1e17a --- /dev/null +++ b/vid-webpack-master/src/app/home/home.component.scss @@ -0,0 +1,4 @@ +// component styles are encapsulated and only applied to their components +* { + color: #FFEF00; +} diff --git a/vid-webpack-master/src/app/home/home.component.ts b/vid-webpack-master/src/app/home/home.component.ts new file mode 100644 index 00000000..1adaf0eb --- /dev/null +++ b/vid-webpack-master/src/app/home/home.component.ts @@ -0,0 +1,30 @@ +import { Component, OnInit } from '@angular/core'; +import { SdcService } from '../services/sdc.service'; +import { DataService } from '../services/data.service'; + +@Component({ + selector: 'my-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'], + providers: [SdcService, DataService] +}) +export class HomeComponent implements OnInit { + + constructor(private _sdcService: SdcService) { + // Do stuff + } + + ngOnInit() { + console.log('Hello Home'); + console.log('getServicesModels: '); + this._sdcService.getServicesModels().subscribe( + // onNext() function + value => console.log('value is ', value), + // onError() function + error => console.log('error is ', error), + // onComplete() function + () => console.log('completed') + ); + } + +} |