commangular icon indicating copy to clipboard operation
commangular copied to clipboard

Make an '.add' command dynamically to a defined mapTo from a service or controller

Open victorsoliveira opened this issue 10 years ago • 1 comments

I need to make something like that:

  • Define an event map; $commangularProvider.mapTo('Event').asSequencial()
  • Add commands dynamically from an another service or controller; $commangular.map('Event').add('Command')

Can i do something like that with commangular framework, or just work if i define commands in config step?

victorsoliveira avatar Oct 05 '15 15:10 victorsoliveira

Commangular build the command execution tree on a angular run block, so at the moment you can't add new commands after the angular configuration stage.

You can do dinamic angular module loading and load new commands in another config block, but never outside.

yukatan avatar Oct 13 '15 13:10 yukatan