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

Android AngularJS a tag internal links #128

Closed
lukemiddlewick-lw opened this issue Mar 21, 2014 · 12 comments
Closed

Android AngularJS a tag internal links #128

lukemiddlewick-lw opened this issue Mar 21, 2014 · 12 comments

Comments

@lukemiddlewick-lw
Copy link

Hi I have a problem with changing views in my angularjs based app on android, all links to views end up with a double extension id in the url.

e.g. the tag
should navigate to:-
chrome-extension://qwertyuioplkkjhggfddsa/browse/

instead it is loaded as:-
chrome-extension://qwertyuioplkkjhggfddsa/qwertyuioplkkjhggfddsa/browse/

The view changes and url is as expected on iOS.

@agrieve
Copy link
Member

agrieve commented Mar 21, 2014

Thanks for the bug report. Very likely a problem with CCA. Just wanted to clarify which angular API you're using for navigation, and what version of Angular you are using?

@lukemiddlewick-lw
Copy link
Author

We are using ngRoute

@lukemiddlewick-lw
Copy link
Author

Angular version is 1.2.0

@agrieve
Copy link
Member

agrieve commented Mar 21, 2014

Sorry, could you confirm as well that your project was created using v0.0.8?

@lukemiddlewick-lw
Copy link
Author

Hi yes project was created with 0.0.8 of cca

@agrieve
Copy link
Member

agrieve commented Mar 21, 2014

Managed to track it down. Thanks again for reporting! Will try to do a release late next week with the fix.

@kzar
Copy link

kzar commented Mar 27, 2014

Oh man I just spent my entire evening figuring out what was happening with this bug. Could you do a release soon, I could really do with it being fixed.

Edit: OK scratch that I've got a work around, if anyone else is having problems using AngularJS' ngRoute due to this check out my post on StackOverflow.

@mmocny
Copy link
Member

mmocny commented Mar 28, 2014

@kzar good point, we should do a release. Thanks for the cough gentle cough prod.

@mwoghiren
Copy link
Contributor

cca v0.0.9 is now released and should fix this problem. Please let us know if you're still having problems.

@kzar
Copy link

kzar commented Apr 2, 2014

@mwoghiren Still having problems since I upgraded, I did this:

# Upgraded CCA
sudo npm install -g cca

# Checked I'm running 0.0.9
cca --version

# Built a new version of my app and installed it on my device
cca build
cca run

and it doesn't work. I've logged the location in AngularJS' $routeChangeStart event and this is what I'm getting:

Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#/opgccfdagmcaobbgnkcmfocffhomjepb/ app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#/ app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#//opgccfdagmcaobbgnkcmfocffhomjepb/new-invoice app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#/ app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#//opgccfdagmcaobbgnkcmfocffhomjepb/manage-transactions app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#/ app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#//opgccfdagmcaobbgnkcmfocffhomjepb/view-reports app.js:30
Change chrome-extension://opgccfdagmcaobbgnkcmfocffhomjepb/index.html#/ 

(I've got an "Otherwise" route that forwards you to / if the path doesn't look right. Each time the AngularJS path has been prepended with the app ID and therefore the user is forwarded straight back there.)

Cheers, Dave.

@agrieve
Copy link
Member

agrieve commented Apr 3, 2014

Ah, I think the problem is that you'll need to recreate your project for the update to take effect (e.g. cca create dir2 --copy-from old-project/www)

Just filed #140 to track this.

@kzar
Copy link

kzar commented Apr 3, 2014

That worked thanks @agrieve :). I did as you said and then installed the relevant plugins in the new project and all seems OK! (It would be cool if cca could just upgrade a project to use the latest version as well I guess.)

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

5 participants