@Component({
selector: '.donation',
template: `
<figure id="donation" move>
<img src="image/qrcode.png"/>
<figcaption>
Buy me a cup of coffee.
</figcaption>
</figure>
`
})
export class DonationComponent{}
@Directive({
selector: '[move]'
})
export class MoveDirective{}
嘿,我想在and中获取<figure id="donation">
元素的宽度/高度。我已多次阅读文档,但仍然找不到解决此问题的方法。有人知道吗?非常感谢!MoveDirective
DonationComponent