Closed twastvedt closed 8 years ago
@twastvedt Can you please provide more info? share code?
Ok, here's a repo that shows what I'm seeing: https://github.com/twastvedt/barbatus-typescript-bug-demo/tree/angular2-meteor-accounts-ui-bug It's possible I'm just completely missing the boat on how to use this.
@dotansimha I'm also seeing the same issue.
I tried both @CanActivate and @RequireUser annotations but could only get @CanActivate to work .
Here is a repo with a branch showing how I'm trying to use RequireUser() : https://github.com/mmccook/mmccook.io/tree/repro-require-user
This can be found in /client/pages/basic/contact/index.ts, line 15. https://github.com/mmccook/mmccook.io/blob/repro-require-user/client/pages/basic/contact/index.ts#L15
The master branch of this repo has @CanActivate being used in place of the @RequireUser annotation and that is working.
If you need any additional information let me know.
Same here.
+1
I may be obliviously stupid to this (only started working with Angular 2 seriously this week). Anyhoo I've had some difficulty getting the @CanActivate decorator to work. Mind you I've been using @angular/router package for my routing and not @angular/router-deprecated... (I am importing CanActivate from @angular/router-deprecated though!)
Is it safe to presume it's just an issue with the different routing packages?
Same problem here, following the tutorial, Angular2-Meteor. I can see the form, but I'm not logged. Some package like and @CanActivate ComponentInstruction is only available on @angular/router-deprecated. But tutorial do not mention this. Anyone solved the problem?
+1
@twastvedt Are you still expiriencing it? Closing it for the moment, please feel free to re-open or create a new issue if you are still having this issue (and please provide an example for code or repo...) Thanks
Sorry, I'm not using Meteor at the moment, though there are enough comments here already to suggest it's still an issue.
I've provided a repo reporting the issue. It's avaible here
@helloncanella @twastvedt
Please try to update to the latest version of this package, also, use the new AuthGuard
instead with the new Angular 2 router.
I tested it now on a clean project and it seems to work fine.
any alternative for accounts-google
I've added
@RequireUser()
as demonstrated in the tutorial, but when no one is logged in the annotated components still load and display.