user603007
user603007

Reputation: 11804

directive in angularjs does not show?

I am playing around with a directive in an angular js application. This is a fragment of my directive:

(function() {
    var gMaps = function($timeout, $q, GeoCoder, mockdataService) {
      return {
        restrict: 'EA',
        template: '<div class="gmaps"></div>',
        replace: true,
        link: function postLink(scope, iElement, iAttrs) {

..

In my index.html I have the directive:

 <gMaps center="map.center" zoom="map.zoom"></gMaps>

When I debug in the console it does not even hit the gmaps.js file? There are no visible errors in the console. What could be wrong? this is a url for the plunkr: http://plnkr.co/edit/fEsaE9XpgmKFqO194X4G?p=preview

Upvotes: 1

Views: 78

Answers (1)

artur grzesiak
artur grzesiak

Reputation: 20348

Change:

<gMaps center="map.center" zoom="map.zoom"></gMaps>

To:

<g-maps center="map.center" zoom="map.zoom"></g-maps>

EDITED PLNKR

Upvotes: 2

Related Questions