Integrating DialogService into our component 

Let's open up track-list.component.ts and inject DialogService for use in our record method. We will also need to determine if the user is logged in to conditionally display a login dialog or confirm prompt, so let's also inject AuthService:

// angularimport { Component, Input } from '@angular/core';// appimport { ITrack } from '../../../core/models';import { AuthService, LogService, DialogService } from '../../../core/services';import { PlayerService } from '../../services/player.service';@Component({  moduleId:,  selector: 'track-list',  templateUrl: 'track-list.component.html'})export class TrackListComponent {  constructor(   private authService: AuthService, private logService: LogService, ...

Get NativeScript for Angular Mobile Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.