can't custom UI login component
See original GitHub issueIssue type
I’m submitting a …
- [X ] bug report
- feature request
Issue description
Current behavior: Error: Can’t resolve all parameters for NgxLoginComponent: ([object Object], ?, [object Object], [object Object]).
Expected behavior: I try to extend NgLoginComponent with a constructor inside
Related code:
import {ChangeDetectorRef, Component, Injectable} from '@angular/core';
import {NbAuthService, NbLoginComponent} from '@nebular/auth';
import {AuthService} from '../auth.service';
import {Router} from '@angular/router';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
})
export class NgxLoginComponent extends NbLoginComponent {
constructor(service: NbAuthService, options: {}, cd: ChangeDetectorRef, routes: Router){
super(service, options, cd, routes);
}
}
The issue appear only if I use constructor. I need to use a constructor because I need implement my own auth service in this component.
Other information:
npm, node, OS, Browser
<!--
Node, npm: v11.6.0, 6.5.0-next.0
OS: macOS Mojave (10.14.2)
Browser: Chrome 72.0.3626.96
-->
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
How do I implement a custom UI Login instead of using lock?
Hosting your own login page (form)!. Custom hosted universal login UI. Disable the animation for log in or reset password. Using the Auth0...
Read more >Cannot create a custom login page with Admin-On-Rest
There is a working example in the admin-on-rest-demo repository: The custom Login component:.
Read more >Unable to select custom Lightning Community page
So try to add your custom LWC component on that std login page and under Administration settings, select login page type as Community ......
Read more >Custom UI control not being rendered - Microsoft Q&A
Custom UI control not being rendered. I would like to ask a question what am I doing wrong that my custom control is...
Read more >UI custom component deploys successfully to instan...
Does anyone know what might be causing us not to get the component fully working 2 in the 3 tested instances? Summary. Successful...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @xeti34. You need to use
@Inject(NB_AUTH_OPTIONS) protected options
as a second parameter of constructor, instead ofoptions: {}
. See dependency-injection in angular docs.Hi, Whats works for me its to add the @Option() annotation
@Inject(NB_AUTH_OPTIONS) @Optional() public options
Hope its helps