Fixed output [Object] when assisning a global object in view-file