-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
Can't get styling applied to calendar #71
Comments
I can't see anything that'd obviously wrong there, I suspect it's probably an issue with your build tool. What are you using? e.g. webpack, system.js etc? |
@mattlewis92 I'm using angular-cli which uses webpack as my build tool. |
That'd odd, it should just work with the CLI. There's definitely some other config interfering with your app though as from the screenshot you can see the optional bootstrap theme is also being included and it's not referenced in the code snippet you included. |
Ah, this is a CLI issue actually, they don't support including stylesheets in typescript config as it's non standard: angular/angular-cli#1459 I think you need to include the stylesheet somewhere in your cli config, there was a PR referenced at the end of that issue that shows how to do it. |
@kodiraj you're not including the stylesheets into your app. You need this somewhere:
|
Just include it in angular.json and refresh the application. Because the CLI does not recognize the @import by the browser, it even loads, but the settings does not apply. I am using CLI version 6.0.x |
I made this configuration in angular.json and it worked |
Same thing here. Just added this css file into my angular.json styles section |
include the CSS file in the global (not component scoped) styles of your app: /* angular-cli file: src/styles.css */ |
Hi, I have error : I include the CSS file in the global styles of my app: In angular.json I alreadyhave this style PLease, tell me how to fix it. |
I got away from the problem of connecting styles and added a line |
Hi, thanks to your response. I've already fixed it.
сб, 3 авг. 2024 г. в 07:21, JAYAGOPAL ***@***.***>:
… include the CSS file in the global (not component scoped) styles of your
app:
/* angular-cli file: src/styles.css */ @import <https://github.com/import>
"../node_modules/angular-calendar/css/angular-calendar.css";
Hi, I have error : Error: Module build failed (from
./node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError:
Module build failed (from ./node_modules/css-loader/dist/cjs.js): Error:
Package path ./css/angular-calendar.css is not exported from package
...\node_modules\angular-calendar (see exports field in
...\node_modules\angular-calendar\package.json)
I include the CSS file in the global styles of my app: @import
<https://github.com/import>
"../node_modules/angular-calendar/css/angular-calendar.css";
In angular.json I alreadyhave this style "styles": [
"node_modules/angular-calendar/css/angular-calendar.css",
"projects/business-slick-estimates/src/styles.scss" ], angular/cli:
"^15.2.7"
PLease, tell me how to fix it.
I got away from the problem of connecting styles and added a line link
href="
***@***.***/dist/css/angular-calendar.css"
rel="stylesheet" in my component template I’m not sure about the optimality
and correctness of this solution, so I’ll wait for your answers and
comments, thx
Did you able to solve problem? I'm using Angular 18 facing same problem
`X [ERROR] Could not resolve
"../node_modules/angular-calendar/css/angular-calendar.css"
src/styles/styles.scss:5:8:
5 │ @import "../node_modules/angular-calendar/css/angular-calendar.css";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
—
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYKEHDYCMAVGLHZQYCIRTGLZPRLGPAVCNFSM6AAAAABL5SDLICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRWGM3DKOJSG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This is the closest I can get to applying styling following code in the demo.

The only error I'm getting in my browser is
I do not have an
entry.ts
but I'm using amain.ts
inside mysrc
folder. It's contents areThe text was updated successfully, but these errors were encountered: