@balticcode/ngx-example-viewer

An Angular library for providing an example viewer like the one from Angular Material.


Keywords
angular, library, example, viewer, docs
License
Apache-2.0
Install
npm install @balticcode/ngx-example-viewer@1.0.0

Documentation

npm version

@balticcode/ngx-example-viewer

An Angular library providing an example viewer like the one from Angular Material.


First of all we want to send probs to all the contributors of Angular Material and ngx-formly who gave us the solid base on which this library was created.


Installation

Via npm:

npm install @balticcode/ngx-example-viewer highlight.js

You will manually have to add the module import of ExampleViewerModule into the desired module.

Via ng-add

ng add @balticcode/ngx-example-viewer

This will:

  • Add @balticcode/ngx-example-viewer and its peer dependencies into package.json
  • Run npm install
  • Import ExampleViewerModule into the root module of your default application (or define a project by using --project <PROJECT_NAME> and/or --module <MODULE_PATH> as additional CLI parameters)

Usage

Getting started

Check out the demo on how to use this library here.

Material theme

Besides the basic component theming you can inject your Angular Material theme to make the example viewer match the rest of your application. Here's how it works.

Code theme

This library utilizes hightlight.js to provide a themed source view including syntax highlighting. Check out the docs to see how to make it work.

Supported themes

All available themes can be found here.

Supported languages

All languages which support syntax highlighting can be found here