-
Notifications
You must be signed in to change notification settings - Fork 9
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
Angular 8 support? #38
Comments
Hi, |
I can't seem to open either link. The first gets stuck infinitely attempting to start the dev server, while the second nets a 404. |
It appears like it's having the same issue. Could you maybe post the code in a Gist or Pastebin? Don't know why stackblitz is giving me issues. |
Here you go : https://github.com/buseodaci/toppy-angular |
Awesome. That link works. I'll report back if I can get it working. Thanks! :D |
I hope it helps. |
Well, the good news is the The code in question: export class AppComponent {
@ViewChild("login", { read: ElementRef, static: true })
login: ElementRef;
overlay: ToppyControl;
overlayControl: boolean;
title = 'Offprint';
currentUser: User;
searchForm = new FormGroup({
query: new FormControl('', Validators.required)
});
constructor(private authService: AuthService, private _toppy: Toppy) {
this.authService.currentUser.subscribe(x => this.currentUser = x);
}
ngOnInit() {
this.overlayControl = false;
const position = new RelativePosition({
placement: OutsidePlacement.BOTTOM_RIGHT,
src: this.login.nativeElement
});
this.overlay = this._toppy
.position(position)
.content(`<div>any HTML content</div>`, { hasHTML: true })
.create();
}
open() {
this.overlayControl = true;
this.overlay.open();
console.log("opened");
}
close() {
this.overlayControl = false;
this.overlay.close();
console.log("closed");
}
controlLoginMenu() {
if (this.overlayControl == false) {
this.open();
} else {
this.close();
}
}
} Any help would be appreciated. |
Hello.
I'm currently getting an error trying to implement Toppy in an Angular 8 SPA, specifically in regards to the
@ViewChild
decorator.On the following piece of code:
The error outputs as:
I believe it might have to do with a lack of support for Angular 8? Though I'm not entirely sure. Any update on this would be appreciated.
The text was updated successfully, but these errors were encountered: