I'm struggling with a custom angular directive that I only want to display conditionally using ng-if. The directive contains HTML elements, one of which is positioned absolutely.
My goal is to make the absolute element's width match the root width of the directive. However, I am unable to change the display of the directive's root to relative.
How do you suggest I go about accomplishing this task?
UPDATE: To clarify, here is a jsfiddle link - http://jsbin.com/qofolahani/edit?html,css,js,console,output
Keep in mind that in the link function, I have not set the css styling for the element so the width remains at 0, preventing me from adjusting the child div's width accordingly.