significant rewrite of the $location service

- don't update browser before and after eval instead
  - sync location properties before eval
  - sync location properties and update browser after eval
- added tests
- symplified the code
- removed $location.toString() because it was not idempotent and useless

This resolves the issue with issuing two $route.onHashChange calls
when the $location was updated with a hashPath that needs to be encoded
This commit is contained in:
Igor Minar
2011-01-13 15:32:13 -08:00
parent b0be87f663
commit 23875cb330
5 changed files with 151 additions and 109 deletions

View File

@@ -77,6 +77,8 @@ function MockBrowser() {
}
}
);
return listener;
};