0

As the question says, how can i add a Decorator dynamically to a property in an already created javascript object? I already have the reference to the javascript object and know how to assign properties and funcions to an object via

Object.assign()

I dont think its very relevant but the decorators im using are the normal angular 2.

user1546652
  • 557
  • 1
  • 5
  • 15
  • What's the use-case you're trying to solve. It might be more clear to use a function instead of a decorator if you're trying to change something dynamically. – nicusor Nov 08 '17 at 20:21
  • Im trying to create creating dynamic components on angular 2, and the decorators i want to use are "@Input" and "@Output". I saw that i can create dynamic components with ng-dynamic-component (i also saw that i can define component class at fly like https://stackoverflow.com/a/39507831/1546652 ) – user1546652 Nov 08 '17 at 23:01

0 Answers0