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

injection of $location results in failing page-refreshes #50

Closed
corsica opened this issue Jul 25, 2012 · 3 comments
Closed

injection of $location results in failing page-refreshes #50

corsica opened this issue Jul 25, 2012 · 3 comments

Comments

@corsica
Copy link

corsica commented Jul 25, 2012

I am not sure if this is a designed trade-off, but the (patched) $location service doesn't like to be injected into a controller.
For example, change the controller def of the 'todo-mobile' example, as such:

line 2:
-- module.factory('todoStore', function ($http, $waitDialog) {
++module.factory('todoStore', function ($http, $waitDialog, $location) {

Navigate to /todo.html#settings, reload the page and see window.location go haywire.

@tbosch
Copy link
Contributor

tbosch commented Jul 27, 2012

Hi,
non, that's not by purpose! Thanks for reporting.

Here is a jsfiddle to reproduce this: http://jsfiddle.net/Du2DY/87/
Go to the page 'http://jsfiddle.net/Du2DY/87/show/#settings', reload it and look into the console.

Tobias

@corsica
Copy link
Author

corsica commented Jul 27, 2012

I see that in my reproduction-example (line 2) I don't inject into a controller but into a module. Has more or less the same effect though it seems. Here a little fork on jsfiddle with the injection on the controller ;-) http://jsfiddle.net/u4zw2/1/

tbosch pushed a commit that referenced this issue Sep 4, 2012
@tbosch
Copy link
Contributor

tbosch commented Sep 4, 2012

Thanks for reporting. Here is an updated jsfiddle with the 1.1.1-SNAPSHOT version: http://jsfiddle.net/u4zw2/3 resp. http://jsfiddle.net/u4zw2/3/show/

Please note: The new version has a different paged filter syntax. See the README.md for details.

Tobias

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