O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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: module.id,  selector: 'track-list',  templateUrl: 'track-list.component.html'})export class TrackListComponent {  constructor(   private authService: AuthService, private logService: LogService, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required