I am trying to customized the zoom widget, i.e. i have created my own zoom in/out template, and now i want to invoke the zooming functionalities, but when i looked into the codes for zoom widget(zoom.js) the code is refererring this.viewModel.zoomOut();, so just would like to know that, from where it will get the reference of this.viewModel , i didnot find anywhere, in my case it comes as "undefined". any clue/pointer on this.
Sachin,
The zoom widget has a viewModel property:
Zoom | API Reference | ArcGIS API for JavaScript 4.0 | viewModel
When you create the zoom widget the constructor looks like this:
var zoom = new Zoom({ view: view });