v3: Access Line class from "@ng-bootstrap/ng-bootstrap/util/accessibility/live"
See original GitHub issueFor a number of reasons, I’ve subclassed NgbTypeahead
. And to get the the constructor chain to work, I need to include the Live
(@ng-bootstrap/ng-bootstrap/util/accessibility/live
) class as a parameter.
With v2.x this worked fine, but I can’t get it to work with the new v3 packaging format.
Intellisense still knows about Live, but I can’t compile:
import {
OnInit, Directive, ElementRef, ViewContainerRef, Renderer2, Injector, ComponentFactoryResolver, NgZone, forwardRef, Input
} from "@angular/core";
import { NgbTypeahead, NgbTypeaheadConfig, NgbTypeaheadWindow } from "@ng-bootstrap/ng-bootstrap";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { Observable } from "rxjs";
//THIS IS THIS PROBLEM
import { Live } from "@ng-bootstrap/ng-bootstrap/util/accessibility/live";
//THIS IS THE PROBLEM
export class MyTypeahead extends NgbTypeahead {
constructor(private _elementRef2: ElementRef, _viewContainerRef: ViewContainerRef, _renderer: Renderer2,
_injector: Injector, componentFactoryResolver: ComponentFactoryResolver, config: NgbTypeaheadConfig,
ngZone: NgZone, live: Live) {
super(_elementRef2, _viewContainerRef, _renderer, _injector, componentFactoryResolver, config, ngZone, live);
}
...
}
Any ideas on how to access Live?
Angular: 6.1 ng-bootstrap: 3.0.0 Bootstrap: 4.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
No results found
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
@dmostert I think that you are well past the point where you can simply extend the existing widget - you seem to have more specific needs which we don’t handle (yet) and this is OK.
As we are not ready to open up our widgets for extension I would suggest copy the code over to your project and maintain your own fork. Fully expect that this is not what you want to hear but writing widgets that can be sub-classed is entirely new challenge that we are not ready to accept at this point.
Closing as won’t fix.
Just updated to Angular 6.1 and ng-bootstrap 3.0.0 and I’m having a similar problem accessing utils in a custom NgbDateParserFormatter, was working fine in 2.x: