Moved resize function to angular, and called with ng-include in the view