Skip to content

Instantly share code, notes, and snippets.

@arantius
Created February 15, 2011 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/827683 to your computer and use it in GitHub Desktop.
Save arantius/827683 to your computer and use it in GitHub Desktop.
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<head>
<title>Angular Title Test</title>
<script src="http://code.angularjs.org/angular-0.9.10.min.js" ng:autobind></script>
</head>
<body>
<script type="text/javascript">
angular.service('title_changer', function($document) {
alert('title_changer service running');
$document.title = 'Changed title!';
}, {$inject: ['$document'], $eager: true});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment