Created
September 25, 2012 18:45
-
-
Save lholmquist/3783658 to your computer and use it in GitHub Desktop.
Datamanger Memory Adapter - Filter Logic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//should this return 1 or 2 values? and yes this is out of order, not suppose to be real code | |
var filtered = tasksValve.filter( { tags: 111 } ); | |
//the datamanager for this example | |
var tasksValve = aerogear.dataManager( "tasks" ).valves.tasks; | |
tasksValve.save([ | |
{ | |
id: 12345, | |
date: "2012-07-30", | |
title: "Task 1-1", | |
description: "Task 1-1 description text", | |
project: 11, | |
tags: [ 111 ] | |
}, | |
{ | |
id: 67890, | |
date: "2012-07-30", | |
title: "Task 2-1", | |
description: "Task 2-1 description text", | |
project: 22, | |
tags: [ 111, 222 ] | |
}, | |
{ | |
id: 54321, | |
date: "2012-07-30", | |
title: "Task 3-1", | |
description: "Task 3-1 description text", | |
project: 33, | |
tags: [ 222 ] | |
} | |
], true ); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment