Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Ng-class on ng-view not updating when route is being changed #16239

@gogachinchaladze

Description

@gogachinchaladze

I'm submitting a ...

  • bug report
  • feature request
  • other (Please do not submit support requests here (see above))

Current behavior:
The thing I want to achieve is: when ngroute is being changed, I must remove active class from current view, wait for leave animation to complete, then add active class to the new view.

When switching pages first time (from navigation) you will see that everything works fine, but when going to the pages second time view class is not updating, so animation is not played. While debugging you can clearly see that visibility boolean is updated correctly, but ng-class on leaving view is not getting updated.

Expected / new behavior:
ng-class on leaving view must be updated.

Minimal reproduction of the problem with instructions:
Here is the plunker:
http://plnkr.co/edit/huGdIRY5ukJajRU1x0li?p=preview

AngularJS version: 1.6.5, 1.6.6

Browser: [Chrome Canary 63.0.3218.0 | Chrome 60.0.3112.113| Firefox 47.0 | Safari 10.0.3]
Operating system: MacOs Sierra 10.3

Question on stackoverflow:
https://stackoverflow.com/questions/46365402/angular-not-updating-ng-class-on-ng-view

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions