MurhafSousli / ngx-highlightjs

Angular syntax highlighting module

Home Page:https://ngx-highlight.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Your documentation is probably outdated

airda2895 opened this issue · comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X] question

OS and Version?

Windows 11

Versions

  • Angular CLI 16.1.5
  • NPM 9.6.7
  • Node 18.17.0

Repro steps

Documentation about main.ts, does not match with my current main.ts structure, because this is what I have in it:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import '@angular/common/locales/global/es';
import { AppModule } from './app/app.module';


platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));

Also, what is the main-custom.ts file in this link? I don't have that file.

Desired functionality

Documentation should be updated, to match the current Angular version, so I can use your module in my project.

Your main.ts file is different because you are using the traditional angular module, the example shows how to bootstrap in standalone component mode.

Just import the module in your app.module.ts and it will work fine.

main-custom.ts is just a file name on the gist I use to show example code (custom config in main file), each file on the gist must have a name but its irrelevant to the docs.