How to use $watch (angularjs tutorial)