trimox / angular-mdc-web

Angular wrapper for Material Design (Web) Components
https://trimox.github.io/angular-mdc-web
MIT License
519 stars 87 forks source link

Support svgIcon in mdc-tab #2268

Open guillaumegarcia13 opened 4 years ago

guillaumegarcia13 commented 4 years ago

Is your feature request related to a problem? Please describe. I wanted to use svgIcon previously declared within mdc-tab but this seens unsupported. svg Icon was declared like this:

constructor(
        public iconRegistry: MdcIconRegistry, 
        public sanitizer: DomSanitizer
    ) { 
        iconRegistry.addSvgIcon('custom', sanitizer.bypassSecurityTrustResourceUrl('/assets/images/custom.svg'));
    }

Describe the solution you'd like I would like to be able to use svgIcon like this:

<mdc-tab>
    <mdc-icon mdcTabIcon>favorite</mdc-icon>
    <mdc-icon mdcTabIcon svgIcon="custom"></mdc-icon>  <!-- <=== Here -->
    <mdc-tab-label>Title</mdc-tab-label>
</mdc-tab>

Describe alternatives you've considered Not using svgIcon

Additional context None