Skip to content
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 Nebular styles does not apply for NbChatComponent #2332

Open
1 task
faustlifes opened this issue Apr 24, 2020 · 3 comments
Open
1 task

Angular Nebular styles does not apply for NbChatComponent #2332

faustlifes opened this issue Apr 24, 2020 · 3 comments

Comments

@faustlifes
Copy link

Issue type

  • bug report
  • feature request

Issue description

I have an ongoing Angular project and I'm trying to add Nebular Chat UI to the project.

I installed nebular with npm and did the imports as mentioned in the site. Functionality is working as expected, but the styles are not applied to the component.

Below are the steps I followed.

npm install --save @nebular/theme @angular/cdk @angular/animations
npm install --save @nebular/eva-icons

Imported NbThemeModule and NbChatModule in app.module.ts

import { NbThemeModule, NbChatModule } from '@nebular/theme';

@NgModule({
imports: [
  ...

  NbThemeModule.forRoot(),
  NbChatModule
]

Added styles in angular.json

"styles": [
      "node_modules/@nebular/theme/styles/prebuilt/default.css"
]

Added html component (Sample available in the site)

<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-form (send)="sendMessage($event)" [dropFiles]="true">
</nb-chat-form>

And get this result:
result_nebular

here is a link to stackoverflow

Related code:

here is a link to codesandbox

Other information:

npm, node, OS, Browser

<!--
Node, npm: codesandbox
OS:  macOS (Catalina)
Browser: Chrome
-->

Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->
@nielspetersen
Copy link

Hey @faustlife,

I am also new to this repository, but the installation via
ng add @nebular/theme does more than installing the package and updating the dependencies.

I guess you are missing some of the files, that are generated during the installation process such as themes.scss and the import in the styles.scss:

@import 'themes';

@import '~@nebular/theme/styles/globals';

@include nb-install() {
  @include nb-theme-global();
};
...

For me the command above worked well. Hope this helps!

@skybabu
Copy link

skybabu commented Oct 28, 2022

I am also getting the same error! Can somebody please respond and provide the correct manual installation guide?

@rubenperegrina
Copy link

Any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants