mathjax-angular
Advanced tools
Comparing version 1.4.2 to 2.0.0
@@ -13,3 +13,3 @@ import { ElementRef, OnChanges, SimpleChanges } from '@angular/core'; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<MathjaxDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<MathjaxDirective, "mathjax,[mathjax]", never, { "mathjax": "mathjax"; }, {}, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<MathjaxDirective, "mathjax,[mathjax]", never, { "mathjax": "mathjax"; }, {}, never, never, false>; | ||
} |
{ | ||
"name": "mathjax-angular", | ||
"version": "1.4.2", | ||
"version": "2.0.0", | ||
"description": "A quick way to implement Mathjax v3 into your Angular project!", | ||
@@ -15,7 +15,7 @@ "homepage": "https://github.com/sajivkumar/mathjax-angular/blob/main/README.md", | ||
"peerDependencies": { | ||
"@angular/common": "^12.1.1", | ||
"@angular/core": "^12.1.1" | ||
"@angular/common": "^14.0.0", | ||
"@angular/core": "^14.0.0" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.2.0" | ||
"tslib": "^2.3.0" | ||
}, | ||
@@ -33,9 +33,22 @@ "author": { | ||
], | ||
"main": "bundles/mathjax-angular.umd.js", | ||
"module": "fesm2015/mathjax-angular.js", | ||
"es2015": "fesm2015/mathjax-angular.js", | ||
"esm2015": "esm2015/mathjax-angular.js", | ||
"fesm2015": "fesm2015/mathjax-angular.js", | ||
"typings": "mathjax-angular.d.ts", | ||
"module": "fesm2015/mathjax-angular.mjs", | ||
"es2020": "fesm2020/mathjax-angular.mjs", | ||
"esm2020": "esm2020/mathjax-angular.mjs", | ||
"fesm2020": "fesm2020/mathjax-angular.mjs", | ||
"fesm2015": "fesm2015/mathjax-angular.mjs", | ||
"typings": "index.d.ts", | ||
"exports": { | ||
"./package.json": { | ||
"default": "./package.json" | ||
}, | ||
".": { | ||
"types": "./index.d.ts", | ||
"esm2020": "./esm2020/mathjax-angular.mjs", | ||
"es2020": "./fesm2020/mathjax-angular.mjs", | ||
"es2015": "./fesm2015/mathjax-angular.mjs", | ||
"node": "./fesm2015/mathjax-angular.mjs", | ||
"default": "./fesm2020/mathjax-angular.mjs" | ||
} | ||
}, | ||
"sideEffects": false | ||
} | ||
} |
@@ -1,5 +0,6 @@ | ||
# mathjax-angular | ||
# mathjax-angular | ||
This plugins implements the browser version of [Mathjax v3][1] into [Angular][2] | ||
***Note***:This library was generated with [Angular CLI][8] version 12. | ||
**_Note_**:This library was generated with [Angular CLI][8] version 12. | ||
@@ -13,4 +14,6 @@ <div style="text-align:center"><a href="https://nodei.co/npm/mathjax-angular/"><img src="https://nodei.co/npm/mathjax-angular.png?downloads=true&downloadRank=true&stars=true&mini=true"/></a></div> | ||
## Install | ||
Below are the steps you need to use this library. | ||
NPM: | ||
``` | ||
@@ -21,2 +24,3 @@ npm install mathjax-angular | ||
Yarn: | ||
``` | ||
@@ -37,10 +41,15 @@ yarn add mathjax-angular | ||
To do that first install the requirements: | ||
``` | ||
npm install (or) yarn | ||
``` | ||
Then either run it in production: | ||
``` | ||
npm run dev production (or) yarn dev production | ||
npm run prod (or) yarn prod | ||
``` | ||
or run it in dev: | ||
``` | ||
@@ -51,28 +60,27 @@ npm run dev (or) yarn dev | ||
### Usage | ||
When importing in the **root** module, the module should be configured | ||
with *.forRoot* method. | ||
with _.forRoot_ method. | ||
```typescript | ||
import { NgModule } from '@angular/core'; | ||
import { AppComponent } from './src/app/app.component'; | ||
import { NgModule } from "@angular/core"; | ||
import { AppComponent } from "./src/app/app.component"; | ||
/*Import*/ | ||
import { MathjaxModule } from 'mathjax-angular'; | ||
import { MathjaxModule } from "mathjax-angular"; | ||
/*Configuration*/ | ||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
MathjaxModule.forRoot(/*Optional Config*/) | ||
], | ||
declarations: [AppComponent], | ||
imports: [MathjaxModule.forRoot(/*Optional Config*/)], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule { } | ||
export class AppModule {} | ||
``` | ||
You can optionally pass config. for this refer to [majax configuration guide][5] | ||
Current configuration defaults to: | ||
```typescript | ||
@@ -93,8 +101,9 @@ { | ||
``` | ||
- For ***config*** field refer [this][6]. | ||
- For ***src*** field refer [CDN][7]. | ||
- For **_config_** field refer [this][6]. | ||
- For **_src_** field refer [CDN][7]. | ||
When importing in a **child** module, the module must be configured to | ||
re-use the same module instance as the root module. So simply | ||
configure the module with the *.forChild* method. | ||
configure the module with the _.forChild_ method. | ||
@@ -116,7 +125,9 @@ ```typescript | ||
```html | ||
<div [mathjax]="content"></div> | ||
<div [mathjax]="content"></div> | ||
``` | ||
In your ts component | ||
In your ts component | ||
```typescript | ||
content = "$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$" | ||
content = "$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$"; | ||
``` | ||
@@ -134,3 +145,3 @@ | ||
[6]: http://docs.mathjax.org/en/latest/web/configuration.html#configuring-and-loading-mathjax | ||
[7]:https://cdnjs.com/libraries/mathjax | ||
[8]:https://github.com/angular/angular-cli | ||
[7]: https://cdnjs.com/libraries/mathjax | ||
[8]: https://github.com/angular/angular-cli |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
141
69114
679
1
+ Added@angular/common@14.3.0(transitive)
+ Added@angular/core@14.3.0(transitive)
+ Addedzone.js@0.12.0(transitive)
- Removed@angular/common@12.2.17(transitive)
- Removed@angular/core@12.2.17(transitive)
- Removedzone.js@0.11.8(transitive)
Updatedtslib@^2.3.0