========== work =========
factory.getInit = function(type,lable){
var t=null;
angular.forEach(factory.models[type], function(value, key) {
if(value.lable == lable){
t=value.init;
console.log("getInit-value.init: "+t);
}
});
return t;
};
========== doesn't work =========
factory.getInit = function(type,lable){
angular.forEach(factory.models[type], function(value, key) {
if(value.lable == lable){
console.log("getInit-value.init: "+value.init);
return value.init;
}
});
};
沒有留言:
張貼留言