Stuck on step 4 map does not show

Here is my code


    <link href="" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet" />
    <link href="css/leaflet.css" rel="stylesheet" />

    <script src="js/vendor/angular.min.js"></script>
    <script src="js/vendor/leaflet.js"></script>
    <script src="js/vendor/angular-leaflet-directive.min.js"></script>

  <body ng-app="NearMeApp">
    <div class="header">
      <div class="container-fluid">
        <h1 class="pull-left">NearMe</h1>

    <div class="main" ng-controller="MainController">
      <div class="container-fluid" id="map-canvas">

    <!-- Modules -->
    <script src="js/app.js"></script>

    <!-- Controllers -->
		<script src="js/controllers/MainController.js"></script>

    <!-- Directives -->

    <!-- Services -->


var app = angular.module('NearMeApp', ['leaflet-directive']);

app.controller('MainController', ['$scope'], function($scope){});

Any help leading or explaining the error would be appreciated.


The issue seems to be with the controller. Please see below for corrected code:

app.controller(‘MainController’, [’$scope’, function($scope){

You are closing the square bracket incorrectly (‘MainController’, [’$scope’],). The square bracket needs to be closed after defining the $scope

Hope it helps :slight_smile:

Step 1 and 2 look correct. There is an error in Step 3.

Incorrect: app.controller('MainController', ['$scope'], function($scope){});

Correct: app.controller('MainController', ['$scope',function($scope){}]);