Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

Scopes Not Destroyed with menuClose directive #105

Open
@jgw96

Description

@jgw96

From @calendee on August 19, 2016 21:5

Short description of the problem:

When using the sidemenu links to navigate from the current view, the current view's controller/view is not destroyed nor is its scope disconnected. It remains active and all watches are still active.

What behavior are you expecting?

When using the sidemenu links to navigate, the current view and controller should be destroyed. Since the menu-close directive causes the app's history root to be reset, that process should disconnect the current view's scope.

When using $ionicHistory.nextViewOptions with historyRoot or disableBack, the current view/scope should be clobbered on the next state change.

Steps to reproduce:

  1. Visit http://plnkr.co/edit/veYrgw7Y4m8jY4ScIFcO and open the console.
  2. Notice the console logs out "HomeCtrl Interval Triggered!" every 3 seconds
  3. Open the sidemenu
  4. Tap "Check-in"
  5. Notice the console continues to log that "HomeCtrl Interval Triggered!" every 3 seconds
  6. Notice the $destroy event is never fired for the HomeCtrl - no console logging occurs.

Which Ionic Version? 1.3

Plunker that shows an example of your issue

http://plnkr.co/edit/veYrgw7Y4m8jY4ScIFcO

Run ionic info from terminal/cmd prompt: (paste output below)
Your system information:

Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
ios-deploy version: 1.8.6
ios-sim version: 4.1.1
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 7.3.1 Build version 7D1014

Copied from original issue: ionic-team/ionic-framework#7788

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions