Updated example to be in line with best practices

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