Dear Support Teams,
I have a questions using metronic in my angular application.
1. Does jquery already installed in metronic or should i import jquery library using npm.
2. I want to use metronic 8 datatables for my angular application. Do you have any guidelines in order to do that.
Thank you
Hi Cheyo,
Yes, you can use ngx-tempusdominus-bootstrap in your Metronic Angular project to use the Tempus Dominus datetime picker.
You can install ngx-tempusdominus-bootstrap using npm by running the following command:
npm install ngx-tempusdominus-bootstrap --save
terima kasih faizal,
How about calendar, can i use Tempus Dominus calendar in metronic angular. or do i need to install ngx-tempusdominus-bootstrap in order to use calendar.
Thanks
Hi Cheyo,
By default, jQuery is not included in Angular. You will need to install it separately if you want to use it in your project.
To use DataTables in an Angular application with Metronic, you can follow these steps:
Install the required packages: You can install the required packages using npm. Run the following command in your terminal:
npm install jquery datatables.net datatables.net-bs4
"styles": [
"node_modules/datatables.net-bs4/css/dataTables.bootstrap4.min.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/datatables.net/js/jquery.dataTables.min.js",
"node_modules/datatables.net-bs4/js/dataTables.bootstrap4.min.js"
]
import { Component, OnInit, AfterViewInit } from "@angular/core";
import * as $ from "jquery";
import "datatables.net";
import "datatables.net-bs4";
@Component({
selector: "app-my-datatable",
templateUrl: "./my-datatable.component.html",
styleUrls: ["./my-datatable.component.css"]
})
export class MyDatatableComponent implements OnInit, AfterViewInit {
constructor() { }
ngOnInit() {
}
ngAfterViewInit() {
$(document).ready(function() {
$("#myTable").DataTable();
});
}
}