Updated example to be in line with best practices

See pull request 4092
https://github.com/angular/angular.js/pull/4092