Comments (18)
We also agree with @webpartisan that there is no 2-way binding currently. Switching the language of the website will not switch the language of the mdLabel. Only on refreshing the page the translation is triggered.
This is our code:
vm.updateTranslations();
$rootScope.$on('$translateChangeSuccess', updateTranslations);
function updateTranslations(event) {
$translate(['GENERAL.PAGINATION.PAGE', 'GENERAL.PAGINATION.ROWS_PER_PAGE', 'GENERAL.PAGINATION.OF']).then(function (translations) {
vm.paginationLabel.page = translations['GENERAL.PAGINATION.PAGE'];
vm.paginationLabel.rowsPerPage = translations['GENERAL.PAGINATION.ROWS_PER_PAGE'];
vm.paginationLabel.of = translations['GENERAL.PAGINATION.OF'];
});
}
Changing the language will trigger the updateTranslations function but will not update the label.
from md-data-table.
This is a valid point. I'll try to fit this in to the next release.
from md-data-table.
resolved in version 0.4.6 :)
from md-data-table.
That looks good; although, I believe that it should extend to the of as well! i.e. "x - y of n"
from md-data-table.
Failed to load template: templates.md-data-table-progress.html...
i am getting this error message and also rest of the templates are not being loaded in the local server.
from md-data-table.
@shivasingh0101 that's strange, what version of Angular are you using?
from md-data-table.
@daniel-nagy angular 1.4.0
from md-data-table.
This is the error showing on my browser...
from md-data-table.
Either they are not being loaded into the template cache or the template cache is somehow getting emptied?
from md-data-table.
Is there any issue with webpack coz we are using webpack to build our app....
from md-data-table.
And one more thing it worked when i loaded the js and css files into my main js file but still the pagination is not working i mean its redirecting to the next page when i pressed next button but data is not rebinding i tried rebinding the data its showing in the console but not onto the page.
from md-data-table.
Is having a page number against the guidelines?
If not so, you could provide variables like $start, $end, $count, $total, $page, $totalPages (like $index, $first, $last, etc. in ngRepeat) so the developer can format their own label like this:
<md-data-table-pagination md-label="$start - $end of $total (page $page of $totalPages)">
That gives away some flexibility of representation; page numbers are more useful in most cases!
IMO, it would look way better than the current API anyway! 😜
from md-data-table.
@daniel-nagy any comments on the latest suggestion?
from md-data-table.
I use angular-translate and would be good to use it with md-label together. Now there is no two-way binding with md-label and I can't change translation dynamically
from md-data-table.
+1
from md-data-table.
Agree with @webpartisan I can not change the label dinamically with angular translate.
from md-data-table.
+1
from md-data-table.
@shivasingh0101 could you solve this? i'm facing the same problem...
from md-data-table.
Related Issues (20)
- Global setting
- How to select all rows? HOT 8
- Exclude certain rows from sorting
- Please bump version and publish to npm
- Custom cell disable using value - Md-data-table - AngularJS
- Sorting when using md-virtual-repeat and md-on-demand
- how can i have a fixed header when using md-vritual-repeat-conatiner
- Missing rows with mdVirtualRepeat
- Sticky column HOT 2
- Multiple parameter ordering HOT 1
- Refresh data table after edit, add, update.
- $mdEditDialog large throws an error while calling $http service on save.
- how to print md data table without order by arrow icon HOT 1
- Pagination localisation options are insufficient
- Live Demo has security breach (Kinda) HOT 3
- maintain sorting state in and out of session
- md-table-pagination not working for server side binding(other than page 1) HOT 1
- Selectable Columns Callback is not working
- Get limited data from server rather binding all data
- Bring md-select selected from server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md-data-table.