javascript - Angularjs, IONIC; Hide DOM element on state changed instead of removing it -


the default behavior or angularjs/ionic remove dom element when route changed/left page , replace new dom elm/run controller again if navigate previous page.

is there way hide dom elm associated route instead of removing completely?

my use case is: ionic app landing page/index takes time compute/render , when user navigate detailed view , come index page build again scratch, because dom removed , needs build again, waist of time rather removing dom elm when route changed hide instead , if user come previous route, show it. improve app performance.

looking forward response.

thanks in advance

abod

use tabs in project: http://ionicframework.com/docs/api/directive/ionnavview/

there lot of stuff understand feature works great.

basicly allows change view without removing dom (it stores in memory). when come previous dom it's loaded memory.


Comments