How I in AngularJS resize a image preserve the aspect Ratio and fit in some size. If overflow the size crop the image. for example, I trie to change this plug-in in jquery to angular http://www.jqueryscript.net/gallery/Resize-Images-To-Fit-In-A-Container-imgLiquid.html
My result is some function resize de image for example 1024x1024 to best fit, for example 800x600, but if the image does not preserve the aspect ratio. for example if to preserve the aspect ration the image must be 800x800 we will crop the image