AngularJS directive to automatically resize DOM content