img-middle-responsive - 0.1.4
img-middle-responsive
- Directive to display an image with reactive centered alignment, both vertically and horizontally.
Installation
- Download the latest release: v0.1.4
- Clone the repository:
git clone https://github.com/teorossi82/img-middle-responsive.git
- Install with Bower:
bower install img-middle-responsive
Requirements
The plugin requires
Quick-help for usage
- Inject into your module the
imgMiddleResponsiveMdl
dependency:
angular;
- Create an object with the information to pass to the directive:
var url = "https://assets-cdn.github.com/images/modules/open_graph/github-octocat.png"; //url image to visualizevar defaultUrl = "http://placehold.it/200x150"; //url image to visualize if master image is not foundvar imgMiddleRespOptions = container: maxWidth:"150px" //maxWidth of image container maxHeight:"150px" //maxHeight of image container var { //function to trigger on click ;}
- Put the directive in your html:
Copyright and license
Copyright @2016 Matteo Rossi, under [MIT license]