Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import { Droide } from './droide';
- @Injectable({
- providedIn: 'root'
- })
- export class DroideService {
- constructor() { }
- public getAll(): Droide[] {
- const array: Droide[] = [];
- array.push(new Droide('R2D2'));
- array.push(new Droide('C3P0'));
- return array;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement