in this example I\'m returning a string depending on whether a text field is a value for \"beast\" and/or \"color\". but this is only returning a string. I would return in two c
Look at this
app.service('myFactoryService', function(){
this.createObj = function(name,type){
var obj = {};
obj.name = name;
obj.type = type;
return obj;
}
});
results.push(myFactoryService.createObj(item.beast,"animal"));
I don't know somehow why two-way binding doesn't permit to show two variables differently, only object, but there is defined service to create an object, then it is created in filter according to both options.