File

projects/web-mev/src/app/features/workspace-manager/models/workspace.ts

Index

Properties

Constructor

constructor(id: string, workspace_name: string, created: Date, url: string)
Parameters :
Name Type Optional
id string No
workspace_name string No
created Date No
url string No

Properties

Public created
Type : Date
Public id
Type : string
Public url
Type : string
Public workspace_name
Type : string
import { Injectable } from '@angular/core';

export class Workspace {
  constructor(
    public id: string,
    public workspace_name: string,
    public created: Date,
    public url: string
  ) {}
}

@Injectable({
  providedIn: 'root',
})
export class WorkspaceAdapter {
  adapt(item: any): Workspace {
    const re = /[()]/g;
    const created_formatted = item.created.replace(re, '');
    return new Workspace(
      item.id, 
      item.workspace_name, 
      new Date(created_formatted), 
      item.url
      );
  }
}

result-matching ""

    No results matching ""