(DEMO > search) TypeError: _.get is not a function
See original GitHub issueTypeError: _.get is not a function at md-data-table.js:244 at Function.m.each.m.forEach (underscore-min.js:5) at addRawDataToStorage (md-data-table.js:243) at Object.fn (md-data-table.js:233) at r.$digest (angular.min.js:131) at r.$apply (angular.min.js:134) at g (angular.min.js:88) at R (angular.min.js:92) at XMLHttpRequest.v.onload (angular.min.js:93)
HTML:
<md-card style="margin:0px">
<md-subheader>Filter by search</md-subheader>
<md-input-container style="margin:15px;">
<label>Search</label>
<input type="text" ng-model="filterName">
</md-input-container>
<div ng-hide="true">
{{(filteredItems = (nutritionList | filter: filterName))}}
</div>
</md-card>
<mdt-table
paginated-rows="{isEnabled: true, rowsPerPageValues: [5,10,20,50]}"
mdt-row-paginator-error-message="Error happened during loading nutritions."
mdt-row="{
'data': filteredItems,
'table-row-id-key': 'id',
'column-keys': ['name', 'calories', 'fat', 'carbs', 'protein', 'sodium', 'calcium', 'iron']
}">
<mdt-header-row>
<mdt-column align-rule="left">Dessert (100g serving)</mdt-column>
<mdt-column align-rule="right">Calories</mdt-column>
<mdt-column align-rule="right">Fat (g)</mdt-column>
<mdt-column align-rule="right">Carbs (g)</mdt-column>
<mdt-column align-rule="right">Protein (g)</mdt-column>
<mdt-column align-rule="right">Sodium (mg)</mdt-column>
<mdt-column align-rule="right">Calcium (%)</mdt-column>
<mdt-column align-rule="right">Iron (%)</mdt-column>
</mdt-header-row>
</mdt-table>
tested with dependencies:
"dependencies": {
"jquery": "~2.1.4",
"angular-material": "master",
"components-font-awesome": "master",
"angular-messages": "~1.4.8",
"angular-route": "~1.4.8",
"angular-loader": "~1.4.0",
"angular-mocks": "~1.4.8",
"angular-paging": "~2.1.0",
"ngmap": "~1.16.7",
"angular-environment": "~1.0.3",
"mdDataTable": "~1.2.0",
"underscore": "~1.8.3",
"lodash": "~3.10.1",
"angular-aria": "~1.4.9",
"angular-animate": "~1.4.9"
}
Any ideas ?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
JQuery: $.get is not a function - javascript - Stack Overflow
If I run the code below, the function $.get seems to be missing (getJSON and others missing too). But $ itself and other...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >form.submit is not a function - TrackJS
This message indicates that our code expects to have an object with a submit function. But if the property exists, it was not...
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 Free
Top 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

Found a sollution. Its just a load order wich seems to be very important!
ALWAYS load lodash after mdDataTable files.
Guys ,
Can you check last comment of https://github.com/iamisti/mdDataTable/issues/63