Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-esri-loader

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-esri-loader

An Angular 2 service to help you load ArcGIS API for JavaScript Modules

  • 0.1.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40
decreased by-49.37%
Maintainers
1
Weekly downloads
 
Created
Source

angular2-esri-loader

An Angular 2 service to help you load ArcGIS API for JavaScript Modules

Install

npm install angular2-esri-loader esri-loader

Usage

Example of using the loader service in a resolver to lazy load the ArcGIS API and

import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';

import { EsriLoaderService } from 'angular2-esri-loader';

@Injectable()
export class EsriMapResolveService implements Resolve<any> {

  constructor(private esriLoader: EsriLoaderService) { }

  resolve() {
    // only load the ArcGIS API for JavaScript when we get to this route
    return this.esriLoader.load({
      // use a specific version of the API instead of the latest
      url: '//js.arcgis.com/3.18/'
    }).then(() => {
      // load the map class needed to create a new map
      // and make it available in the route's data
      return this.esriLoader.loadModules(['esri/map']);
    });
  }
}

Keywords

FAQs

Package last updated on 23 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc