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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.