Uncertain if this could be considered an anti-pattern, I am hoping someone can provide insight on a better approach.
I have attached a resize event to the window and also want the same code to execute on load. Is this the proper way to achieve this?
angular.element($window).bind("resize", function (event) {
// implementing code here
}).trigger("resize");
fiddle link below.