Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mathjax-angular

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathjax-angular - npm Package Compare versions

Comparing version 1.4.2 to 2.0.0

esm2020/directive/index.mjs

2

directive/mathjax.directive.d.ts

@@ -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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc