How can i use editor in Angular?
How can i use editor in Angular?
I'm using editor in angular 4.
I've included all the scripts in .angular-cli.json:
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/datatables.net/js/jquery.dataTables.js",
"../node_modules/datatables.net-buttons/js/dataTables.buttons.js",
"../node_modules/datatables.net-buttons/js/buttons.colVis.js",
"../node_modules/datatables.net-buttons/js/buttons.flash.js",
"../node_modules/datatables.net-buttons/js/buttons.html5.js",
"../node_modules/datatables.net-buttons/js/buttons.print.js",
"../node_modules/datatables.net-editor/js/dataTables.editor.js"
]
When I try to instantiate editor instance using:
var editor = new $.fn.dataTable.Editor( {} );
it says 'dataTable' does not exist on type 'JQuery'.
How can I make it work?
Answers
+1
Is that just a TypeScript error that is occuring during compilation, or is it happening in your browser? If TypeScript, then try:
Allan
@allan this solution didn't work for me