Created
June 18, 2020 17:47
-
-
Save Nathan-Nesbitt/4caf4856b6bc12b65389136673b73e2b to your computer and use it in GitHub Desktop.
Uses the newly created Service Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { ExampleServiceService } from '../example-service.service'; | |
@Component({ | |
selector: 'app-component-example', | |
templateUrl: './component-example.component.html', | |
styleUrls: ['./component-example.component.css'] | |
}) | |
export class ComponentExampleComponent implements OnInit { | |
value: number = 0; | |
constructor(service:ExampleServiceService) { | |
this.value = service.myTestFunction(1, 2, 3, 4); | |
} | |
ngOnInit() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment