diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-02 23:44:50 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-02 23:44:50 +0100 |
commit | 311c84b1bf0fa3a9680b16ba1ec3309a0a1dca1f (patch) | |
tree | 987a2b00e211e56298f257834bef29bb268a6274 /sandbox/testAppNevena/Front/src/app/app.component.ts | |
parent | e3999e37a0a0018be4704ed58b7d984781f429c8 (diff) | |
parent | ee11a13a99d5635eb27850bcd909b73e6f50fced (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar
Diffstat (limited to 'sandbox/testAppNevena/Front/src/app/app.component.ts')
-rw-r--r-- | sandbox/testAppNevena/Front/src/app/app.component.ts | 28 |
1 files changed, 28 insertions, 0 deletions
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 |