Here is the component template

template: `<h1 class = "dragStyle" [drag] = "true">DRAG THIS ELEMENT</h1>`,
styles : [`
    .dragStyle{
        margin : 12px;
    }`]    

Here is the constructor of [drag] attribute directive-

constructor(
    private _el: ElementRef, 
    private _renderer : Renderer,
    @Attribute('class') type : string) {
        console.log(type);

I need to access the value of margin property associated with the dragStyle 
class for some computations.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to