IONIC SIDE MENU is slow


#1

Hello

I am using ion side menu which is working fine

Problem is that. i am fetching content from SQLITE.

My state gets changed on click on menu item.

Now It is showing data first on Page and then side menu hides. (When user runs the app, it seems delay to user)

Can we hide side menu first and then show content. So user can’t seems delay


#2

Sorry but I don’t understand your problem. Could you please explain it better?


#3

Hello

Thanks for your reply.

I have 2 items in side menu
Dashboard and favorite.

When i click favorite . I am getting content from SQL-Lite . But it seems content is showing first and then sidemenu hides. ( Delay happening , because content is showing first)


#4

Is this content populated into the main view?

What are you expecting? Should side menu close before content is populated?


#5

Yes, i want side menu close before content is populated.

Thanks


#6

Does it possible to close side menu before content is populated?


#7

Why don’t you close it programmatically on list element click, like this:

$ionicSideMenuDelegate.toggleLeft();

Read more about it here: http://ionicframework.com/docs/api/service/$ionicSideMenuDelegate/


#8

it’s still same… content is populating first


#9

Man, you’re lazy :slight_smile: you should have posted same content here like in your SstackOverflow question.

Remove href from your side menu lost elements.

And change your on click function to look like this:

$scope.toggleLeft = function(viewname) {
    $ionicSideMenuDelegate.toggleLeft();
    $state.go(viewname);
};

and your list should look like this:

 <ion-list>
        <ion-item menu-close ng-click="toggleLeft('app.articles')">
          Dashboard
        </ion-item>
        <ion-item menu-close ng-click="toggleLeft('app.favourite')">
          Favorite
        </ion-item>
  </ion-list>

#10

its still the same. Now Screen is sliding first(Got back button). then hiding the menu.