Fixed example page.
Added scope.apply to update the scope after method is executed.