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", |
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
//When a field has multiple values, the filter method of the Memory Data Adapter won't work | |
//Here is some example data | |
userValve.save([ | |
{ | |
id: 12351, | |
fname: "Luke", | |
lname: "Public", | |
dept: [ "Accounting", "IT" ] |
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
///Already Updated https://github.com/aerogear/TODO/commit/9af0ee9f5f155c76d359e6d55d6e46d25d4a31de | |
//extracted from app.js of TODO | |
//Remove | |
switch( type ) { | |
case "project": | |
options.valves = ProjectsValve; | |
Projects.remove( options ); |
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
//this is extracted from app.js from my modified TODO app | |
//First Create a datamanager | |
var dm = aerogear.dataManager([ "tasks", "tags", "projects"]), | |
TasksValve = dm.valves[ "tasks" ], | |
ProjectsValve = dm.valves[ "projects" ], | |
TagsValve = dm.valves[ "tags" ]; | |
//at this point if you do |
NewerOlder