Comments (10)
Could you fill the issue template properly, which angular version are you using?
from ngx-highlightjs.
Angular 15. Angular version here is irrelevant as well as node version, OS version etc. I might make a pull request tomorrow. Will keep you posted
from ngx-highlightjs.
It is important if it is a real issue, it should be documented which version of the library and which in angular version!
from ngx-highlightjs.
Noted. I must have missed that. It's Angular Version 15 and "ngx-highlightjs": "^7.0.1",
from ngx-highlightjs.
For me, it works fine with Angular 15, I couldn't reproduce it, What is exactly the error?
from ngx-highlightjs.
I will get to and try again today/tomorrow and report back. My apologies
from ngx-highlightjs.
My apologies for the delay, still looking into it. Will confirm tomorrow if indeed an error, or something I did on my end.
from ngx-highlightjs.
I was able to circle back to today as we finally got angular universal build working/deployed. The following is the error I am getting:
Generating browser application bundles (phase: emitting)...ERROR ReferenceError: requestAnimationFrame is not defined
at requestAnimationFrame (./node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js:19:105)
at requestAsyncId (./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js:14:64)
at schedule (./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js:24:72)
at schedule (./node_modules/rxjs/dist/esm/internal/Scheduler.js:8:57)
at setTextContent (./node_modules/ngx-highlightjs/fesm2020/ngx-highlightjs.mjs:372:9)
at highlightElement (./node_modules/ngx-highlightjs/fesm2020/ngx-highlightjs.mjs:336:14)
at ngOnChanges (./node_modules/ngx-highlightjs/fesm2020/ngx-highlightjs.mjs:320:22)
at call (./node_modules/@angular/core/fesm2020/core.mjs:1574:14)
at callHook (./node_modules/@angular/core/fesm2020/core.mjs:2498:18)
at callHooks (./node_modules/@angular/core/fesm2020/core.mjs:2457:17)
```
It is being used as following in my `ui-common.module.ts` file:
```
providers: [
{
provide: HIGHLIGHT_OPTIONS,
useValue: {
coreLibraryLoader: () => import('highlight.js/lib/core'),
lineNumbersLoader: () => import('highlightjs-line-numbers.js'),
languages: {
typescript: () => import('highlight.js/lib/languages/typescript'),
javascript: () => import('highlight.js/lib/languages/javascript'),
scss: () => import('highlight.js/lib/languages/scss'),
xml: () => import('highlight.js/lib/languages/xml'),
css: () => import('highlight.js/lib/languages/css'),
},
},
},
],
```
from ngx-highlightjs.
Same here
ng add @nguniversal/express-engine
Configuration:
{
provide: HIGHLIGHT_OPTIONS,
useValue: <HighlightOptions>{
fullLibraryLoader: () => import('highlight.js'),
themePath: 'solarized-dark.css'
}
},
from ngx-highlightjs.
I tried to replicate the issue with Angular Universal but it worked fine, I couldn't reproduce this error! Anyway, I added a check in the ngOnChanges
just in case.
Please try again with v8.0.0 and let me know if it worked out!
from ngx-highlightjs.
Related Issues (20)
- npm cannot resolve peer dependency @angular/common@">=14.0.0" from [email protected] HOT 1
- Could not find a declaration file for module 'highlightjs-line-numbers.js' - Show line numbers HOT 6
- The gist class member of the GistDirective is private
- Binding data from innerHtml HOT 5
- setTheme does not load theme if `themePath` was not specified in the configuration HOT 1
- line-number and styling not being applied for json HOT 3
- Angular 16
- Using ngx-highlightjs in stand-alone components
- Your documentation is probably outdated HOT 1
- (love) Just to tell you how great your software is HOT 2
- This repo not support pnpm HOT 9
- Add line numbers options HOT 1
- Multiline strings on C# breaks highlighting HOT 3
- Property '"code"' is incompatible with index signature. HOT 1
- Code is not rendered in SSR HOT 1
- highlightjs dependency removed from ngx-highlight.js? HOT 3
- Please update to Angular 18
- Numbers are not showed HOT 1
- Failed to migrate to 12.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-highlightjs.