mdDataTable icon indicating copy to clipboard operation
mdDataTable copied to clipboard

Inject error

Open luongnd169 opened this issue 8 years ago • 9 comments

I have problem when i inject 'mdDataTable'. I try to inject 'ngMdIcons' but it not work. Please help me

luongnd169 avatar Oct 27 '16 16:10 luongnd169

@luongnd169 did you check the demo examples and you tried in the same way?

iamisti avatar Nov 02 '16 06:11 iamisti

Noticed this too now @iamisti , injecting per demo examples

We solved this by including 'ngSanitize' and 'ngMdIcons' as app dependencies before 'mdDataTable'

james89 avatar Nov 02 '16 15:11 james89

I have a similar error(Uncaught Error: [$injector:modulerr]), my project structure is as follows:

`

<link rel="stylesheet" href="../../bower_components/angular-material/angular-material.min.css">
<link rel="stylesheet"
      href="../../bower_components/material-design-icons/iconfont/material-icons.css">
<link rel="stylesheet" href="../../bower_components/md-data-table/dist/md-data-table-style.css">
<link rel="stylesheet" href="styles/styles.css">


<script src="../../bower_components/angular/angular.min.js"></script>
<script src="../../bower_components/angular-animate/angular-animate.min.js"></script>
<script src="../../bower_components/angular-aria/angular-aria.min.js"></script>
<script src="../../bower_components/angular-messages/angular-messages.min.js"></script>
<script src="../../bower_components/angular-mocks/angular-mocks.js"></script>
<script src="../../bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="../../bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
<script src="../../bower_components/angular-material/angular-material.min.js"></script>
<script src="../../bower_components/md-data-table/dist/md-data-table-templates.js"></script>
<script src="../../bower_components/md-data-table/dist/md-data-table.js"></script>

/* my module */ angular.module('app.core', [ 'ngSanitize', 'blocks.logger', 'blocks.router', 'ngMaterial', 'mdDataTable', 'ui.router' ]); `

offwork avatar Nov 11 '16 10:11 offwork

I received the same error and had to install angular-material-icons in addition to mdDataTable

bower install angular-material-icons --save
bower install md-data-table --save

Then include both ngMdIcons and mdDataTable in your application Also be sure to include all of the libraries

javascript

'public/lib/md-data-table/dist/md-data-table-templates.js',
'public/lib/md-data-table/dist/md-data-table.js',
'public/lib/angular-material-icons/angular-material-icons.js'

css

'public/lib/md-data-table/dist/md-data-table-style.css',
'public/lib/angular-material-icons/angular-material-icons.css'

before I had this error from Chrome Console

Error: [$injector:modulerr] Failed to instantiate module mdDataTable due to:
Error: [$injector:modulerr] Failed to instantiate module ngMdIcons due to:
Error: [$injector:nomod] Module 'ngMdIcons' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.5.9/$injector/nomod?p0=ngMdIcons

closedLoop avatar Nov 28 '16 03:11 closedLoop

@closedLoop 's answer solved the problem for me but i also had to include ngSanitize to get rid of all error messages. This should be better documented in the documentation.

JimmyPesto avatar Jul 31 '17 20:07 JimmyPesto

I follow the rules and now is asking for lodash.... man. This going to overpopulate my app's dependencies.

aretw0 avatar Oct 16 '17 01:10 aretw0

i think, too many depedencies @aretw0 are you leaving this directive or still using it?

ikwijaya avatar Feb 01 '18 09:02 ikwijaya

@ikwijaya leaving, I'm using this instead.

aretw0 avatar Feb 01 '18 19:02 aretw0

@aretw0 me too.

ikwijaya avatar Feb 08 '18 04:02 ikwijaya