android - Cordova AngularJS How to free Controllers from RAM? -


i running cordova angularjs app on 7'' android tablet. app has 3 controllers : rootcontroller , theaterscontroller , settingscontroller

pomidoroapp.config(function ($routeprovider) { $routeprovider     .when('/',     {         controller: 'rootcontroller',         templateurl: 'views/rootcontrollerview.html'     })     .when('/theaters',     {         controller: 'theaterscontroller',         templateurl: 'views/theaterscontrollerview.html'     })     .when('/settings',     {         controller: 'settingscontroller',         templateurl: 'views/settingscontrollerview.html'     })     .otherwise({ redirectto: '/'}); 

});

pomidoroapp.controller('rootcontroller', function($scope,$window,$location){     $scope.recommendedmovies = []; init(); $scope.somefunction = function() {      $location.path("/theaters");             }; function init(){     };   

});

pomidoroapp.controller('theaterscontroller', function($scope,theatersfactory,$window,$location){  $scope.theaters = []; init(); $scope.somefunction2 = function() {      $location.path("/");            };    function init(){     $scope.theaters = theatersfactory.gettheaters(); }    

});

pomidoroapp.controller('settingscontroller', function($scope){ 

});

rootcontrollerview.html :

<div class="content"> <ul class="list"> <button type="button" style="font-size:38px;" ng-click="somefunction()">click me!</button>   <li class="list-divider">recommended movies</li>   <li ng-show="!ready">     receiving data...   </li>   <li ng-show="ready" ng-repeat="movie in recommendedmovies | filter:name">     <a href="#/theaters">       <div><img style="float:left; width:120px; height:177px; margin-right:10px;"class="movieimg" src="{{movie.posters.profile}}" /><strong style="font-size:18px;">{{movie.title}}</strong><p style="font-size:16px;">{{movie.critics_consensus}}</p></div>       <div style="clear:both;"></div>        </a>   </li> </ul> 

theaterscontrollerview.html :

<div class="content"> <button type="button" style="font-size:38px;" ng-click="somefunction2()">click me 2!</button> <ul class="list   <li class="list-divider">theaters nearby</li>   <li data-ng-repeat="theater in theaters">     <a href="#">       <strong>{{theater.name}}</strong>       <p>{{theater.address}}</p>     </a>   </li> </ul> 

in rootcontrollerview.html there button opens theaterscontrollerview.html function somefunction() . in theaterscontrollerview.html there button opens rootcontrollerview.html function somefunction2() . every time rootcontrollerview.html , theaterscontrollerview.html shown somefunction() , somefunction2() , ram used app increasing.

the name of app hellocorodva , here ram usage of app : image of ram usage of app

how decrease ram usage of app ? how free ram rootcontroller or theaterscontroller ?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -