Hello currently I am developing an integration using Angular to create a panel for dragging blocks. I am trying to follow the Angular guide provided by Lucid here:
https://developer.lucid.co/guides/#angular
However I am encountering a problem. My panel appears and I can see my blocks but when I try to drag a block it doesn't get placed on the canvas. I'm not sure how to implement the part described in "Step 6: Write your Angular app."
I'm unsure if this component is necessary to refresh the web page when I place a block. Please help me with this issue.
I didn't implement this code:
import {Injectable} from '@angular/core';
@Injectable() export class DataFromExtension {
public ids: string[] = [];
constructor() {
//Listen for lists of selected item IDs
window.addEventListener('message' (event) =>
{ if (event.data['ids']) { this.ids = event.data['ids']; } });
//Once ready to receive those messages ask the extension to refresh data
parent.postMessage('refresh' '*'); } }