Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49186

Loading a template in a view

$
0
0

@ordekci wrote:

Hi. I make an error view like below:

<ion-view>
   <ion-content class="padding">
    <img src='images/error.png'/>
     <h1>
         There is an error during process
     </h1>
        </ion-content>
 </ion-view>

When I go to a view, if an error occurs, I want to show this error page in my view. I try to ng-include directive for this in my view like below:

  <ion-view>
    <ion-content class="padding">
    <div ng-show="errorocurred">
            <div ng-include src="templates/error.html"></div>
    </div>
      </ion-content>
 </ion-view>

errorocurred is my variable that I set it in contrroller($scope.errorocurred.). I try to make like this, but it can not. How can I make this. Thanks in advance

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>