Interviewer And Interviewee Guide

Hybrid Application Developer Interview Question:

Tell me what is the advantage of caching the views in Ionic apps?

Submitted by: Muhammad
Ionic by default caches up to ten views, which improves performance and also maintains different states in the views at the same time. For example, the cache can maintain scroll position in the views or active state of buttons.

Caching can be disabled per view by using cache: false in UI-router's state config, like in the following example:

$stateProvider.state('myState', {
cache: false,
url : '/myUrl',
templateUrl : 'my-template.html'
})
Caching can be also disabled globally, by setting maxCache to 0:

$ionicConfigProvider.views.maxCache(0);
Submitted by: Muhammad

Read Online Hybrid Application Developer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.