-
Notifications
You must be signed in to change notification settings - Fork 12k
Missing providedIn in ng g guard #10509
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
Comments
@Brocco I don't understand why you closed the PR: as a service, if the guard is not provided either via providedIn: 'root' or in a module (which have now been explicitly discouraged in v6, see #10170), where is it provided? I just tried to just pass a guard to canActivate without provider and as expected it's not working. |
why don't we just mark Guard and Resolver as providedIn: 'root' when it's listed in canActivate and resolvers |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
npm install @angular/cli -g
ng new helloworld --routing
cd helloworld
ng g guard hello
Observed behavior
Desired behavior
Mention any other details that might be useful (optional)
PR : angular/devkit#795
The text was updated successfully, but these errors were encountered: