Advertisement
Guest User

Untitled

a guest
May 11th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import { Component, OnInit } from '@angular/core';
  2. import { ComunicadosService } from '../comunicados.service';
  3. import { Comunicados } from '../shared/comunicados.model';
  4.  
  5. @Component({
  6. selector: 'app-cards',
  7. templateUrl: 'src/app/cards/cards.component.html',
  8. styleUrls: ['src/app/cards/cards.component.css'],
  9. providers: [ComunicadosService]
  10.  
  11. })
  12.  
  13. export class CardsComponent implements OnInit {
  14.  
  15. public comunicados: Comunicados[]
  16.  
  17. constructor(private comunicadosService: ComunicadosService){}
  18.  
  19. ngOnInit() {
  20. this.comunicados = this.comunicadosService.getComunicados()
  21. console.log(this.comunicados)
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement