We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http://try.buildwinjs.com/#listview:grouped
var myData = new WinJS.Binding.List([ { title: "Banana Blast", ... ]}; var grouped = myData.createGrouped(function (item) { return item.title.toUpperCase().charAt(0); }, function (item) { return { title: item.title.toUpperCase().charAt(0) }; }, function (left, right) { return left.charCodeAt(0) - right.charCodeAt(0); });
How to implement that in angularjs e.g.
$scope.items = [ { title: "Banana Blast", ... ]; $scope.grouped =
The text was updated successfully, but these errors were encountered:
I would like to know if it is possible and in the case how we can use listview:grouped ( http://try.buildwinjs.com/#listview:grouped ) with angular-winjs. Thanks.
Sorry, something went wrong.
Yep, it's possible to use grouped ListViews. You need to have an Binding.List set up on your scope that supports grouping. Here's an example:
<!DOCTYPE html> <html ng-app="sample" ng-controller="sampleController"> <head> <title>Example of Grouped ListView</title> <link rel="stylesheet" type="text/css" href="Microsoft.WinJS.4.0\css\ui-dark.css" /> <script type="text/javascript" src="Microsoft.WinJS.4.0\js\base.js"></script> <script type="text/javascript" src="Microsoft.WinJS.4.0\js\ui.js"></script> <script type="text/javascript" src="angular.js"></script> <script type="text/javascript" src="angular-winjs.js"></script> <script> angular.module('sample', ['winjs']).controller("sampleController", function ($scope) { $scope.dataSource = new WinJS.Binding.List([1, 2, 3, 4, 5]).createGrouped(function groupingFunction(item) { if (item < 3) { return "0"; } return "1"; }, function groupData(item) { if (item < 3) { return {title: "Group 0"}; } return { title: "Group 1" }; }); }); </script> </head> <body> <win-list-view item-data-source="dataSource" group-data-source="dataSource.groups"> <win-item-template> Item {{item.data}} </win-item-template> <win-group-header-template> {{item.data.title}} </win-group-header-template> </win-list-view> </body> </html>
TheWrathOfConst
No branches or pull requests
http://try.buildwinjs.com/#listview:grouped
How to implement that in angularjs e.g.
The text was updated successfully, but these errors were encountered: