Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. export class Album {
  2. constructor(
  3. public id: number,
  4. public name: string,
  5. public url: string,
  6. public photoscount: number
  7. ) {}
  8. }
  9.  
  10. export class AlbumComponent implements OnInit {
  11. album: Album;
  12. constructor(private appService: AppService, private route: ActivatedRoute) {}
  13.  
  14. ngOnInit() {
  15. this.appService
  16. .getAlbum(this.route.snapshot.paramMap.get("url"))
  17. .subscribe((album: Album) => {
  18. this.album = album;
  19. });
  20. }
  21. }
  22.  
  23. <h4>{{album.name}}</h4>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement