简体   繁体   中英

Make an angular component styled like a button (Angular Material)

When I wrap a button inside custom button components, the spacing between buttons disappears. Example.

在此处输入图片说明

How do I "trick" the browser into thinking that my wrapping components are normal buttons (by a saas inheritance mechanism or something like that)?

<button type="button" mat-raised-button [disabled]="disabled">
  {{ label }} <mat-icon>navigate_next</mat-icon>
</button>

通常,您可以使用HostBinding来设置组件本身(而不是子组件)的样式

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM