import { Injectable } from '@angular/core' ; import { Http , Headers } from "@angular/http" ; import { Observable } from "rxjs" ; export class Link { constructor ( public readonly href , public readonly text ? , public readonly rel ? ) { this . text = text || href ; this . rel = rel || "none" ; } } @ Injectable ( ) export class BPMNStore { constructor ( private http ) { } listDiagrams ( ) { console . log ( 'listDiagrams' ) ; return Observable . of ( [ new Link ( "/diagrams/initial.bpmn" ) , new Link ( "/diagrams/pizza-collaboration.bpmn" ) ] ) . delay ( 2000 ) ; } paletteEntries ( ) { return Observable . of ( { 'extra' : { group : 'storage' , className : [ 'fa-coffee' , 'fa' ] , title : 'EXTRA' , action : { click : ( ) => console . log ( 'EXTRA' ) } } } ) . delay ( 1000 ) ; } }