Update view.js

fix getting the value from the model