Hello,
I want to test some observables operations, one of theme is the combineArrays method :
var Observable = require("FuseJS/Observable");
var foo = Observable(1);
var boo = Observable("a", "b", 'c');
var moo = Observable(3);
var res = foo.combineArrays(boo, moo, function(f, b, m) {
// f holds [1]
// b holds ["a", "b", "c"]
// m holds [3]
return [f[0], m[0], b.length]; // the resulting observable will hold the values (1, 3, 3)
})
console.log(res.value);
The console.log output null, from the doc it should output 1,3,3
The second test is to pass parameters from route :
// Page one
var params = Observable();
name = params.map(function(x){ return x.name; })
function gotoDesc(){
route.push('desc', name);
}
module.exports = { name : name };
// Page Desc
var params = this.Parameter;
console.log(params.value)
This attempt output error like parameter shouldn’t be an observable.
Some light please ?
thank you