Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since Angular 1.3rc2/3 menu items seem to no longer update when changing route #68

Closed
patroza opened this issue Sep 30, 2014 · 2 comments

Comments

@patroza
Copy link

patroza commented Sep 30, 2014

E.g no longer updates:

ng-class="{active: (item.fullSegment | routeSegmentStartsWith)}">
@patroza patroza changed the title Since Angular 1.3rc3 menu items seem to no longer update when changing route Since Angular 1.3rc2/3 menu items seem to no longer update when changing route Sep 30, 2014
@patroza
Copy link
Author

patroza commented Sep 30, 2014

Should be the following change:

$parse: due to fca6be71, all filters are assumed to be stateless functions
Previously it was just a good practice to make all filters stateless. Now it's a requirement in order for the model change-observation to pick up all changes.

If an existing filter is statefull, it can be flagged as such but keep in mind that this will result in a significant performance-penalty (or rather lost opportunity to benefit from a major perf improvement) that will affect the $digest duration.

To flag a filter as stateful do the following:

myApp.filter('myFilter', function() {
  function myFilter(input) { ... };
  myFilter.$stateful = true;
  return myFilter;
});

said workaround seems to work.

@artch artch closed this as completed in 03f8425 Sep 30, 2014
@artch
Copy link
Owner

artch commented Sep 30, 2014

@Sickboy Nice catch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants