IONIC SIDE MENU is slow

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

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

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)

Is this content populated into the main view?

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

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

Thanks

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

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/

it’s still same… content is populating first

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>

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