Is is possible to check whether a given attribute is present in a directive, ideally using isolate scope or in a worst case scenario the attributes object.
With a direct
To Check for attributes when using angular 1.5+ components you can use the $postLink lifecycle hook and the $element service like this:
constructor(private $element) {} $postLink() { if(!this.$element.attr('attr-name')){ // do something } }