Closed droshev closed 2 years ago
@JKMarkowski is there a value in that ?
as you already know you can use both in angular to project the content and I think the only added value as of now if you plan to use your angular component as custom elements. In such case your component is ready for it.
When we implemented a fiori3 shellbar as customer element so it can be used in both angularJS apps and as well as in angular we had to use slots inside angualr components there was no other way - but in here I am not sure..
@droshev The thing is we would be using viewEncapsulation: shadowDom, the issue is that we currently have viewEncapsulation: none to allow the css from outer usage to affect it which would no longer be applicable. Having custom elements can be useful but only if we don't want that outer styles be applied to the component
I would like to reopen this issue, considering new SAP strategy using WebComponents. It will give our components more reuse.
We have already several use-cases to use our fundamentals components as web component, but @ContentChild/Children/ng-content
will make it difficult to use.
We just introduced a process to convert NG to WC -> UI5, but components that relies on nested structure and make use of ContentChild/children/ng-content
its impossible to use.
From one angular' issue:
@ContentChildren/ContentChild cannot be supported in Elements, because Angular has no awareness of what is being projected into a template when used outside of Angular.
@fkolar do you know how many components would be affected? And what should we use to replace them?
Is this a bug, enhancement, or feature request?
feature request
Briefly describe your proposal.
Currently, when you have nested Angular custom elements, and the child element contains
ng-content
orcontent
elements in its template, content projection/insertion points don't work. It works if it is usedslot
elements. More information can be found here: angular/angular/issues/24536The idea is to explore the option of migrating from using
ng-content
toslot
.Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)
angular 7.2 fundamental-ngx - latest