I am trying to extend the Angular Material component to provide custom CSS. I want to use the same component, but just change the CSS. If its the theme, I can change the properties, but I want to change the style hardcoded in the component. So, I'm trying to expand a component. Here is what I did.
@Component({ selector: 'my-tab-nav-bar', styles: [``] // custom css here }) export class TabNavBarComponent extends MdTabNavBar { }
This does not work because the template is not specified. Therefore, I also add a template. So, I will copy the template.
@Component({ selector: 'my-tab-nav-bar', template: `<div class=\"mat-tab-links\"> <ng-content></ng-content> <md-ink-bar></md-ink-bar> </div> `, styles: [``] // custom css here }) export class TabNavBarComponent extends MdTabNavBar { }
Now the problem is that he does not know what md-ink-bar and is not exported to Angular. In any case, I can only expand the css change.
angular angular-material2
Skeptor Jun 16 '17 at 9:41 on 2017-06-16 09:41
source share