bptlab/scylla-ui

View on GitHub
src/app/guards/files-selected.guard.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { FileSharingService } from '../services/file-sharing/file-sharing.service';

@Injectable()
export class FilesSelectedGuard implements CanActivate {

  canActivate() {
    return (this.fileService.get('bpmn') != null && this.fileService.get('xml') != null);
  }

  constructor(private fileService: FileSharingService) { }
}