import { Component , OnInit } from '@angular/core' ; import { ActivatedRoute } from '@angular/router' ; @ Component ( { selector : 'app-details' , templateUrl : './details.page.html' , styleUrls : [ './details.page.scss' ] } ) export class DetailsPage implements OnInit { item : any ; constructor ( private route ) { } ngOnInit ( ) { this . route . data . subscribe ( routeData => { this . item = routeData [ 'item' ] ; } ) ; } }