Skip to content

Instantly share code, notes, and snippets.

@lbdremy
Created September 9, 2013 16:33
Show Gist options
  • Save lbdremy/6498169 to your computer and use it in GitHub Desktop.
Save lbdremy/6498169 to your computer and use it in GitHub Desktop.
working example for angular + leaflet + angular-leaflet-directive on IE8!
<html xmlns:ng="http://angularjs.org" id="ng-app" class="ng-app:demoapp" ng-app="demoapp" ng-controller="DemoController">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="https://raw.github.com/tombatossals/angular-leaflet-directive/master/src/angular-leaflet-directive.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<script>
document.createElement('leaflet');
</script>
<![endif]-->
</head>
<body ng-controller="DemoController">
<leaflet width="640" height="480"></leaflet>
</body>
<script>
var app = angular.module("demoapp", ['leaflet-directive']);
app.controller("DemoController", function($scope) {
// Nothing here!
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment