Hi Scott,

Yes, anything that is not a template (as your inserted HTML) does not have 
access to anything angular. You can't set/get anything from your angular 
class from the DOM side of things. (that would break the whole elements 
part!)
To access attributes you can get them via inputs. However, you can't set 
them. Use Elemetref fro now. In ivy this will get easier.
for now, something like this will work:
addClass(cssClass: string) {
this.elm.classList.add(cssClass);
}
removeClass(cssClass: string) {
this.elm.classList.remove(cssClass);
}

This elm is the ElementRef.natveElement. Refer to my sample on how to get 
that into your class easily. Well, that's for the css classes, for 
attributes you have to use `this.elm.setAttribut(...)`

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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