Fix element size pb when used in angular directive