mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
Stupid IE8 in compatibility mode or in IE7 mode returns true for `('onhashchange' in window)`, but does not support hashchange event.
Closes #353
18 lines
487 B
HTML
18 lines
487 B
HTML
<!DOCTYPE HTML>
|
|
<html xmlns:ng="http://angularjs.org">
|
|
<script type="text/javascript" src="../build/angular.js" ng:autobind></script>
|
|
<script type="text/javascript">
|
|
function Cntl($route) {
|
|
$route.when('/item1', {});
|
|
$route.when('/item2', {});
|
|
$route.onChange(function() {
|
|
alert('change');
|
|
});
|
|
}
|
|
Cntl.$inject = ['$route'];
|
|
</script>
|
|
<body ng:controller="Cntl">
|
|
<a href="#/item1">test</a>
|
|
<a href="#/item2">test</a>
|
|
</body>
|
|
</html>
|