I'm attempting to use Nebular to setup a chat to display a static array of messages. Currently, when I try to just do as shown in the doc here, I get the error
ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AppModule)[NbStatusService -> NbStatusService -> NbStatusService]:
NullInjectorError: No provider for NbStatusService!
However, I'm not using a service so I have no idea what kind of service it's referring to. My current (bare) code: html
<div style="text-align: center">
<nb-chat title="Nebular Conversational UI">
<nb-chat-message *ngFor="let msg of messages"
[type]="msg.type"
[message]="msg.text"
[reply]="msg.reply"
[sender]="msg.user.name"
[date]="msg.date"
[files]="msg.files"
[quote]="msg.quote"
[latitude]="msg.latitude"
[longitude]="msg.longitude"
[avatar]="msg.user.avatar"></nb-chat-message>
</nb-chat>
<h2> You won </h2>
<button pButton type="button" label="Previous" (click)="navigateToPrevious()"></button>
<button disabled="true" pButton type="button" label="Next" (click)="navigateToNext()" pTooltip="This feature has not yet been implemented. Come back to see how your program did, step by step!"></button>
</div>
ts
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-cc-results',
templateUrl: './cc-results.component.html',
styleUrls: ['./cc-results.component.scss']
})
export class CcResultsComponent implements OnInit {
gameId:string = "";
messages: any[] = [
{
text: 'Custom template was provided as a title!',
date: new Date(),
reply: false,
user: {
name: 'Bot',
avatar: 'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/robot-face.png',
},
},
];
constructor(private router:Router) { }
ngOnInit(): void {
}
navigateToNext() {
this.router.navigate(['game/review'])
}
navigateToPrevious() {
this.router.navigate(['game/upload'])
}
}
The lack of documentation is making it super difficult to use this for me, so I'd really appreciate some help. Thank you.
I've tried doing exactly as shown in the doc, but it doesn't seem to work. There are no other resources available that I can find, and searching for my issue doesn't return anything useful.
Ran into this issue myself. I found adding these to the imports on my app.module.ts fixed the issue:
NbThemeModule.forRoot({ name: 'default' }),
NbLayoutModule,
NbEvaIconsModule,
NbChatModule
When I ran "ng add @nebular/theme" to my existing project with multiple modules it did not do this automatically. However, when I tried creating a fresh angular project running the command added these directly to my app.module and it fixed the issue.