Last active
January 3, 2016 07:39
-
-
Save lanterndev/8430668 to your computer and use it in GitHub Desktop.
AngularJS Issue 4608 (with target="_self")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>AngularJS Plunker</title> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.min.js"></script> | |
<script> | |
angular.module('broken', []) | |
.controller('MainCtrl', function ($scope, $location) { }); | |
</script> | |
</head> | |
<body> | |
<div ng-app="broken"> | |
<h1>AngularJS with anchor link - broken by injecting $location</h1> | |
<div ng-controller="MainCtrl"> | |
<a href="#anchor" target="_self">broken 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