Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* SystemJS module definition */
- declare var module: NodeModule;
- declare module 'dmn-js';
- interface NodeModule {
- id: string;
- }
- import { Component, OnInit } from '@angular/core';
- import {HttpClient} from '@angular/common/http';
- import * as DmnJS from 'dmn-js';
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
- })
- export class AppComponent implements OnInit {
- title = 'DMN';
- constructor(private http: HttpClient){
- }
- ngOnInit(): void {
- var viewer = new DmnJS ({ container: 'body' });
- var dmnXML; //DMN 1.1 xml
- viewer.importXML(dmnXML, this.handleError);
- }
- handleError(err: any) {
- if (err) {
- console.warn('Ups, error: ', err);
- }else {
- console.log('rendered');
- }
- }
- load(): void {
- const url = '/assets/dish-decision.dmn';
- this.http.get(url, {
- headers: {observe: 'response'}, responseType: 'text'
- }).subscribe(
- (x: any) => {
- console.log('Fetched XML, now importing: ', x);
- //this.modeler.importXML(x, this.handleError);
- },
- this.handleError
- );
- }
- save(): void {
- //this.modeler.saveXML((err: any, xml: any) => console.log('Result of saving XML: ', err, xml));
- }
- }
- ERROR in ./node_modules/dmn-js-drd/lib/Viewer.js
- Module parse failed: Unexpected token (175:4)
- You may need an appropriate loader to handle this file type.
- | additionalModules,
- | canvas,
- | ...additionalOptions
- | } = options;
- |
- ERROR in ./node_modules/dmn-js-shared/lib/base/Manager.js
- Module parse failed: Unexpected token (292:16)
- You may need an appropriate loader to handle this file type.
- | }
- |
- | _viewsChanged = () => {
- | this._emit('views.changed', {
- | views: this._views,
- ERROR in ./node_modules/dmn-js-decision-table/lib/Viewer.js
- Module parse failed: Unexpected token (75:6)
- You may need an appropriate loader to handle this file type.
- | modules,
- | additionalModules,
- | ...config
- | } = options;
- |
- ERROR in ./node_modules/dmn-js-literal-expression/lib/Viewer.js
- Module parse failed: Unexpected token (77:6)
- You may need an appropriate loader to handle this file type.
- | modules,
- | additionalModules,
- | ...config
- | } = options;
- |
- webpack: Failed to compile.
Add Comment
Please, Sign In to add comment