showing basic usage of scope.$apply() in Angularjs