Hello !
I read https://github.com/garciparedes/ng-katex#readme
I have tried writing math exercises with simple equations in an app that I want to develop with ionic 5 and Angular.
But I can’t.
I cannot insert math equations in the tag like “ion-card”
Can anyone help me?
I installed ng-katex from the command line of Visual Studio Code.
I have three files:
1- home.module.ts
In this file I added this:
import {KatexModule} from ‘ng-katex’;
Then this:
@NgModule ({
imports: [
CommonModule,
FormsModule,
IonicModule,
HomePageRoutingModule,
KatexModule
],
statements: [HomePage]
})
2- In the file: home.page.ts
For example, I did this:
import {Component} from ’@angular / core’;
@Component ({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
template: <ng-katex-paragraph [paragraph] = “paragraph”>
})
export class HomePage {
paragraph: string = \ x ^ 2 + y ^ 2 5 \ ;
constructor () {
}
}
3- In the file: home.page.html
it is in this file that I want to insert the simple equations in the ion-card tags
But I can’t. I don’t want to do js functions to solve the equations but it’s just display them.
Can anyone really help me? from the three files: home.module.ts; home.page.ts; home.page.ts
I watched on (http://youtube.com/), there isn’t a video that explains this.