diff options
author | Nevena Bojovic <nenabojov@gmail.com> | 2022-02-28 19:48:30 +0100 |
---|---|---|
committer | Nevena Bojovic <nenabojov@gmail.com> | 2022-02-28 19:48:30 +0100 |
commit | 1fa69862057db4db53cfda5be9c24b4228ef63f7 (patch) | |
tree | 7ccbb29a54f62bbbf72eddcdab374f23ce8799e5 /sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts | |
parent | 2d1768a0683c43db2934701abbf2171c3f0a3988 (diff) | |
parent | 3bb27fb8bc5ee54cd8ffe818059c18cd168b4353 (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into testAppNevena
Diffstat (limited to 'sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts')
-rw-r--r-- | sandbox/test-projekat-danijel/frontend/src/app/page-two/page-two.component.ts | 25 |
1 files changed, 25 insertions, 0 deletions
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(['']); + } +} |