AngularJS Support

5 Sep 20172 minutes to read

AngularJS is a JavaScript framework added to a HTML page with a 

Apply the plugin and property assigning the Map element through the directive that starts with the letter “e-“.  The following code illustrates how to bind data to the Map component through Angular support.

  • HTML
  • <div ng-controller="MapController"> 
    
           <div id="AngularMap" style="width:700px;height:400px" ej-map e-zoomsettings-enablezoom="enableZoom">
    
              <div e-layers>
    
                  <div e-layer e-shapedata="shapeData" e-shapesettings-fill="nfill" e-shapesettings-strokethickness="strokeThickness" e-shapesettings-stroke="stroke" >
    
                  </div>
    
              </div>
    
           </div>	                     
    
           <div>
    
               Shape Color:  <input type="text" id="Text11" ng-model="fill" style="width: 110px">
    
           </div>  
    
       </div>
    
       angular.module('SyncApp', ['ejangular'])
    
                   .controller('MapController', function ($scope) {                  
    
                       $scope.enableZoom = true,                                    
    
                       $scope.shapeData = world_map;            
    
                       $scope.fill = "#4E7EC4";
    
                       $scope.strokeThickness = "0.5";
    
                       $scope.stroke = "white";                               
    
                   });

    AngularJS Support Map