Keep elements in DOM - AngularJS compatibility