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 --- .../testAppNevena/Front/src/app/app.component.ts | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sandbox/testAppNevena/Front/src/app/app.component.ts (limited to 'sandbox/testAppNevena/Front/src/app/app.component.ts') diff --git a/sandbox/testAppNevena/Front/src/app/app.component.ts b/sandbox/testAppNevena/Front/src/app/app.component.ts new file mode 100644 index 00000000..6e66e308 --- /dev/null +++ b/sandbox/testAppNevena/Front/src/app/app.component.ts @@ -0,0 +1,28 @@ +import { Component } from '@angular/core'; +import { NgModel } from '@angular/forms'; +import { Router } from '@angular/router'; +import { Serve1Service } from './serve1.service';// + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'project'; + a = 0; + b = 0; + Sum = ""; + + + constructor(private serve1: Serve1Service, private router: Router) { } // + + sumNumbers() { + console.log(this.a + ':' + this.b); + // za slanje back-u, subscribe - asinhrono + this.serve1.sendNumbers(this.a, this.b).subscribe((serviceSum) => { + console.log(serviceSum); + this.Sum = serviceSum; + }) + } +} \ No newline at end of file -- cgit v1.2.3