gund / ng-dynamic-component

Dynamic components with full life-cycle support for inputs and outputs for Angular
https://malkevich-alex.gitbook.io/ng-dynamic-component/
MIT License
561 stars 65 forks source link

[Feat] Support outputs context #477

Closed gund closed 2 years ago

gund commented 2 years ago

Add IoEventContextToken and IoEventContextProviderToken that will be used as a context when output handlers are invoked. See usage: https://github.com/gund/ng-dynamic-component/blob/051cd691ee198dd671a6cdc487952924dfb36874/README.md?plain=1#L204-L248

Now IoService is part of the public API and you may use it to bind inputs/outputs imperatively anywhere from your code.

Also most of the codebase was refactored to replace any with more typesafe unknown and one bug in dynamic directive ref was fixed when host component was typed as a class instead of an instance.

DEPRECATIONS:

gund commented 2 years ago

:tada: This PR is included in version 10.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: