konvajs / ng2-konva

Angular & Canvas - JavaScript library for drawing complex canvas graphics using Angular.
http://rafaelescala.com/ng2-konva/
119 stars 33 forks source link

Cant create dynamic stage component #30

Closed iamebuka closed 4 years ago

iamebuka commented 4 years ago

Hello

I am trying to create a dynamic stage components but then I cant get the stage to add my layers/shapes to. Can you make this possible or am I missing something?

iamebuka commented 4 years ago

I figure this. Here is an idea for some other person who might have a similar problem.

  1. Create a component and define the <ko-stage></ko-stage> within the components template.
  2. Read the konva stage using ViewChild in components typescript file.

Then you can create dynamic compoment the regular angular way. Hope this helps. 🙂