ionic display fullscreen image on click

i am building a mobile app using Ionic. Created a layout similar to this –> Card Layout

How to show the card image on full screen when the image gets clicked by user and back to normal when clicked again.

Plese find the exisitng code below: home-ctrl.js

(function () {
'use strict';

angular.module('testApp').controller('HomeCtrl', ['$scope', 'collegeApi', '$ionicModal', HomeCtrl]);

function HomeCtrl($scope, collegeApi, $ionicModal) {
    var vm = this;

    vm.imgList = [
            name: 'slider2.jpg'
            name: 'slider3.jpg'
            name: 'slider4.jpg'
            name: 'slider5.jpg'

    $scope.homeEvents = collegeApi.getHomeData();




<ion-view view-title="Home" ng-controller="HomeCtrl as vm">
        <ion-slide ng-repeat="img in vm.imgList">
            <img ng-src="" class="full-image">

    <div class="list card back-color" ng-repeat="homeEvent in homeEvents">

        <div ng-switch="homeEvent.type">
            <div ng-switch-when='star'>
                <div class="item item-icon-left item-energized">
                    <i class="icon ion-star light"></i>
                    <h2 class="light font-size-1">
            <div ng-switch-when="event">
                <div class="item item-icon-left item-calm">
                    <i class="icon ion-android-calendar light"></i>
                    <h2 class="light font-size-1">
            <div ng-switch-when="sport">
                <div class="item item-icon-left item-balanced">
                    <i class="icon ion-android-bicycle light"></i>
                    <h2 class="light font-size-1">
            <div ng-switch-default>
                <div class="item item-icon-left item-dark">
                    <i class="icon ion-star light"></i>
                    <h2 class="light font-size-1">

        <div class="item item-body">
            <img class="full-image" src="" ng-click="buttonClick('img/conference.jpg')">
                <div class="text-justify" data-markdown="{{homeEvent.details}}"></div>

        <div class="item tabs tabs-secondary tabs-icon-left">
            <a class="tab-item" href="#">
                <i class="icon ion-share"></i> Share



Here is the screen shot : Screen shot


Following these steps hope so this will help you

First use in your .HTML file this script

 <script id="modal.html" type="text/ng-template">
                        <div class="modal" ng-click="closeModal()">
                        <img src="{{imgUrl}}" style="display:block; width:100%; max-width:600px; margin:auto"/>

Second Use in Your Controller

$ionicModal.fromTemplateUrl('modal.html', function (modal) {
                $scope.gridModal = modal;
            }, {
                scope: $scope,
                animation: 'slide-in-up'
            $scope.openModal = function (data) {
                $scope.inspectionItem = data;
            $scope.closeModal = function () {

3rd Use in your CSS file

.modal .scroll {
height: 100% !important;
background-color: black !important;

display: -webkit-box !important;
display: -moz-box !important;
display: -ms-flexbox !important;
display: -webkit-flex !important;
display: flex !important;

-webkit-box-direction: normal !important;
-moz-box-direction: normal !important;
-webkit-box-orient: horizontal !important;
-moz-box-orient: horizontal !important;
-webkit-flex-direction: row !important;
-ms-flex-direction: row !important;
flex-direction: row !important;

-webkit-box-align: center !important;
-moz-box-align: center !important;
-webkit-align-items: center !important;
-ms-flex-align: center !important;
align-items: center !important;

Edited: Just Copy and paste the code into the files, and change the parameter of imgeURI to your image URL. The java script automatic call by id modal.html and on the image View click use