JSFiddle - React, Tailwind, and code Playground

by pkozlowski_opensource

HTML

<div ng-controller="testController">
    <span>zoom: {{zoom}}</span>
</div>

JavaScript

var app = angular.module('myApp', []);

//generate this on the server side
app.constant('CONSTANTS', {zoomLevel: 8});

app.factory('map', function(CONSTANTS){
    return {
        zoomLevel: CONSTANTS.zoomLevel  
    };
});

function testController($scope, map){
    $scope.zoom = map.zoomLevel;
}