Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2. import { Droide } from './droide';
  3.  
  4. @Injectable({
  5. providedIn: 'root'
  6. })
  7. export class DroideService {
  8.  
  9. constructor() { }
  10.  
  11. public getAll(): Droide[] {
  12. const array: Droide[] = [];
  13.  
  14. array.push(new Droide('R2D2'));
  15. array.push(new Droide('C3P0'));
  16.  
  17. return array;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement