Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class Album {
- constructor(
- public id: number,
- public name: string,
- public url: string,
- public photoscount: number
- ) {}
- }
- export class AlbumComponent implements OnInit {
- album: Album;
- constructor(private appService: AppService, private route: ActivatedRoute) {}
- ngOnInit() {
- this.appService
- .getAlbum(this.route.snapshot.paramMap.get("url"))
- .subscribe((album: Album) => {
- this.album = album;
- });
- }
- }
- <h4>{{album.name}}</h4>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement