New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rete-angular-render-plugin

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rete-angular-render-plugin

Angular Render (experimental) ==== #### Rete.js plugin

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

Angular Render (experimental)

Rete.js plugin

import { AngularRenderPlugin } from 'rete-angular-render-plugin';

editor.use(AngularRenderPlugin);

Import ReteModule

import { ReteModule } from 'rete-angular-render-plugin';

@NgModule({
  imports: [ReteModule]
})
export class AppModule {}

Examples

  • Codesandbox

Control

import { AngularControl } from 'rete-angular-render-plugin';

export class NumControl extends Control implements AngularControl {
  component: Type<ControlComponent>
  props: {[key: string]: unknown}
  
  constructor(key) {
    super(key);
    
    this.component = ControlComponent;
    this.props = // key-value
// ...

Custom node

Extend node component

import { Component, ChangeDetectorRef } from "@angular/core";
import { NodeComponent, NodeService } from 'rete-angular-render-plugin';

@Component({
  templateUrl: './node.component.html', // copy template from src/node
  styleUrls: ['./node.component.sass'], // copy styles from src/node
  providers: [NodeService]
})
export class MyNodeComponent extends NodeComponent {
  constructor(protected service: NodeService, protected cdr: ChangeDetectorRef) {
    super(service, cdr);
  }
}

Add component to entryComponents of your module

@NgModule({
  entryComponents: [MyNodeComponent]
})
export class AppModule {}

Custom component for all nodes

editor.use(AngularRenderPlugin, { component: MyNodeComponent });

Custom component for specific node

import { Component } from 'rete';
import { AngularComponent, AngularComponentData } from 'rete-angular-render-plugin';

export class AddComponent extends Component implements AngularComponent {
  data: AngularComponentData;

  constructor() {
    super('Add');
    this.data.render = 'angular';
    this.data.component = MyNodeComponent;
  }
// ...

Keywords

angular

FAQs

Package last updated on 19 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts