export class Login{
result:Array<Object>;
constructor(http: Http,private dd:dataService) {
this.dd.showLoader();
this.dd.fetchData().subscribe((result) =>{
this.result =result
},
(err)=>console.log(err),
()=>{console.log("Done")
this.dd.hideLoader();
});
}
}
<sd-navbar></sd-navbar>
<router-outlet></router-outlet>