Skip to content

Instantly share code, notes, and snippets.

@lanterndev
Last active December 26, 2015 08:49
Show Gist options
  • Save lanterndev/7125477 to your computer and use it in GitHub Desktop.
Save lanterndev/7125477 to your computer and use it in GitHub Desktop.
Comparison for AngularJS Issue #4608
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<script>
angular.module('broken', [])
.controller('MainCtrl', function ($scope) { });
</script>
</head>
<body>
<div ng-app="broken">
<h1>AngularJS with anchor link - working because $location not injected</h1>
<div ng-controller="MainCtrl">
<a href="#anchor">link to anchor</a>
<div style="margin-top: 800px">
<a name="anchor">anchor</a>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment