Getting it working with webpack
See original GitHub issueI am trying to get DataTables working with webpack using angular 2.4.
What versions you are using?
- angular version: 2.4
- jquery version: 3.1.1
- datatables version: 1.10.13
- angular-datatables version: 2.1.0
- angular-MM version: ?
What’s the problem?
I can’t get my table interactive. I don’t know where to put the dependencies.
Can you share your code?
This is what I have so far. I added this to install dependencies in package.json.
npm install jquery --save
npm install datatables.net --save
npm install datatables.net-dt --save
npm install angular-datatables --save
In app.module.ts I added at the top:
import { DataTablesModule } from 'angular-datatables';
and at the ‘imports’ key under @NgModule:
DataTablesModule,
Then in table.template.html I added the HTML from the “Zero configuration” Getting Started manual.
<table datatable class="row-border hover">
...
</table>
But now I don’t know how to make the table a datatable. Should I add an import somewhere? I am not using Angular-CLI so the manual does not help me here.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:25 (2 by maintainers)
Top Results From Across the Web
Getting Started - webpack
Webpack is used to compile JavaScript modules. Once installed, you can interact with webpack either from its CLI or API.
Read more >Getting Started With Webpack - Smashing Magazine
Let's take a deep dive into what webpack is and how to use it in your ... When running it the build command...
Read more >A mostly complete guide to webpack 5 (2020)
Getting started with webpack. First steps with webpack. Configuring webpack. Working with HTML. webpack's development server.
Read more >Webpack Tutorial for Beginners: A Complete Step ... - CodeinWP
Read this webpack tutorial for beginners to learn your first steps in bundling and serving HTML/JavaScript in an optimal fashion.
Read more >A Beginner's Guide to Webpack - SitePoint
In this tutorial, I'll introduce all the core concepts to help you get started. Note: in this tutorial I've used webpack 5.9.0.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Look at this: https://github.com/l-lin/angular-datatables/issues/1295
Summary: just run npm install angular-datatables@6.0.0
I’m getting the same error.