【发布时间】:2017-10-16 10:29:23
【问题描述】:
这是组件模板
template: `<h1 class = "dragStyle" [drag] = "true">DRAG THIS ELEMENT</h1>`,
styles : [`
.dragStyle{
margin : 12px;
}`
]
这里是[拖动]属性指令的构造函数-
constructor(
private _el: ElementRef,
private _renderer : Renderer,
@Attribute('class') type : string) {
console.log(type);
我需要访问与 dragStyle 类关联的边距属性的值以进行一些计算。
【问题讨论】:
标签: javascript css angular