Comments (2)
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.
from angular-winjs.
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>
from angular-winjs.
Related Issues (20)
- Tool Bar Command 'selected' property not binding.
- Module 'ngLocale' is not available
- SplitView opened-display-mode: overlay makes commands inaccessable HOT 2
- win-item-template dows not work with Angular 1.5.7 directives
- Optimizing the amount of watchers
- Flyout is hidden when typing button Alt HOT 1
- Can we change code distributed for angular-winjs as it is under MIT license? HOT 2
- Support for Angular 2.0 HOT 1
- winjs as dependency HOT 1
- Support for Angular 1.4/1.5 HOT 7
- Pivot Control - SelectedIndex/Item attributes are still not working HOT 2
- Pivot Control - SelectedIndex/Item attributes are still not working
- Pivot - Wrong tab direction first time load
- Angular2 adapter for winjs is needed HOT 1
- How to dynamically replace content in Angular-WinJS win-split-view-pane? HOT 1
- AutoSuggestBox doesn't set the selected value HOT 1
- Filtering listView issue HOT 8
- Two-way-databinding doesn't work for win-toolbar-command attributes
- is angular 1.3 is the stable version used for winjs?
- Support adapter for angular2
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 angular-winjs.