Skip to content

Instantly share code, notes, and snippets.

@Nathan-Nesbitt
Last active June 18, 2020 17:47
Show Gist options
  • Select an option

  • Save Nathan-Nesbitt/1ce987727a80a47e7e1969d875b15473 to your computer and use it in GitHub Desktop.

Select an option

Save Nathan-Nesbitt/1ce987727a80a47e7e1969d875b15473 to your computer and use it in GitHub Desktop.
Creates a function for a service in Angular NativeScript
export class ExampleServiceService {
constructor() { }
public myTestFunction(...numbers: number[]): number {
// This is a simple function to add up some numbers //
let result = 0;
for (let val of numbers) {
result += val;
}
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment