From dce4e644d5e5d9c97ff5ac337448b52f2a2a64fd Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Wed, 2 Mar 2022 23:38:27 +0100 Subject: Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into Tamara # Conflicts: # .gitignore --- .../src/app/page-two/page-two.component.ts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts (limited to 'sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts') diff --git a/sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts b/sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts new file mode 100644 index 00000000..f30bf9e2 --- /dev/null +++ b/sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { ValuesService } from '../values.service'; + +@Component({ + selector: 'app-page-two', + templateUrl: './page-two.component.html', + styleUrls: ['./page-two.component.css'] +}) +export class PageTwoComponent implements OnInit { + + colors?: string[]; + + constructor(private values: ValuesService, private router: Router) { } + + ngOnInit(): void { + this.values.getColors().subscribe((colors) => { + this.colors = colors; + }) + } + + goToAddColor() { + this.router.navigate(['']); + } +} -- cgit v1.2.3