New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 0.1.11 to 1.0.0

5

CHANGELOG.md

@@ -5,4 +5,9 @@ # angular-esri-loader Change Log

## 1.0.0
### Changed
- bump esri-loader to 1.0.0
## 0.1.11
### Changed
- Removed index.ts as main entry point

3

index.js
"use strict";
var esri_loader_service_1 = require('./src/esri-loader.service');
Object.defineProperty(exports, "__esModule", { value: true });
var esri_loader_service_1 = require("./src/esri-loader.service");
exports.EsriLoaderService = esri_loader_service_1.EsriLoaderService;
//# sourceMappingURL=index.js.map
{
"name": "angular2-esri-loader",
"version": "0.1.11",
"version": "1.0.0",
"description": "An Angular 2 service to help you load ArcGIS API for JavaScript Modules",
"scripts": {
"test": "tsc",
"prepublish": "tsc"
"prepublish": "tsc",
"preversion": "npm run test && git add README.md CHANGELOG.md"
},

@@ -26,3 +27,3 @@ "repository": {

"@angular/core": "^2.1.0",
"esri-loader": "^0.1.2",
"esri-loader": "^1.0.0",
"rxjs": "5.0.0-beta.12",

@@ -29,0 +30,0 @@ "zone.js": "^0.6.23"

# angular2-esri-loader
An [Angular 2](https://angular.io/) service to help you load [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/) modules.
An [Angular](https://angular.io/) library to help you load [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/) modules.
Exposes a service that wraps the functions from the [esri-loader](https://github.com/tomwayson/esri-loader) library in new functions that return promises.
Exposes a service that wraps the functions from the [esri-loader](https://github.com/tomwayson/esri-loader) library in new functions that return promises.
To understand why this is needed, and the benefits of using esri-loader over other techniques, see the [esri-loader README](https://github.com/tomwayson/esri-loader#why-is-this-needed).
## Install

@@ -51,5 +53,26 @@ ```bash

### In an Angular CLI Application
To use this library in an [Angular CLI](https://github.com/angular/angular-cli) application, the best place to start is to follow the instructions in [this gist](https://gist.github.com/tomwayson/e6260adfd56c2529313936528b8adacd).
For an example of how to use this service to lazy load the ArcGIS API and resolve modules in a route, see
[esri-angular-cli-example's esri-map-resolve.service.ts](https://github.com/tomwayson/esri-angular-cli-example/blob/ab4540912904cf78ccfd904fb3bfa4c69b4aa1da/src/app/esri-map/esri-map-resolve.service.ts).
### In an angular2-webpack-starter Application
See [this gist](https://gist.github.com/jwasilgeo/00855ee002aca822e33abd8a7a031f56) for instructions on how to use this library in an [AngularClass/angular2-webpack-starter](https://github.com/AngularClass/angular2-webpack-starter) application.
## ArcGIS Types
This service doesn't make any assumptions about which version of the ArcGIS API you are using, so you will have to manually install the appropriate types.
### 4.x Types
Follow [these instructions](https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript) to install the 4.x types.
For Angular CLI applications, you will also need to add "arcgis-js-api" to `compilerOptions.types` in src/tsconfig.app.json and src/tsconfig.spec.json [as shown here](https://gist.github.com/tomwayson/e6260adfd56c2529313936528b8adacd#adding-the-arcgis-api-for-javascript-types).
Then you can use the `__esri` namespace for the types as seen in [this example](https://github.com/kgs916/angular2-esri4-components/blob/68861b286fd3a4814c495c2bd723e336e917ced2/src/lib/esri4-map/esri4-map.component.ts#L20-L26).
### 3.x Types
Unfortunately the `__esri` namespace is not defined for 3.x types. You can use [these instructions](https://github.com/Esri/jsapi-resources/tree/master/3.x/typescript) to install the 3.x types, but then [you will still need to use `import` statements to get the types](https://github.com/Esri/jsapi-resources/issues/60). This may cause build errors that may or may not result in actual runtime errors depending on your environment.
## Examples

@@ -56,0 +79,0 @@ This service is in use in these applications:

export declare class EsriLoaderService {
constructor();
isLoaded(): boolean;
isLoaded(): Element;
load(options?: Object): Promise<Function>;

@@ -5,0 +5,0 @@ loadModules(moduleNames: string[]): Promise<any[]>;

@@ -11,4 +11,5 @@ "use strict";

};
var core_1 = require('@angular/core');
var esri_loader_1 = require('esri-loader');
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var esri_loader_1 = require("esri-loader");
var EsriLoaderService = (function () {

@@ -44,3 +45,3 @@ function EsriLoaderService() {

for (var _i = 0; _i < arguments.length; _i++) {
modules[_i - 0] = arguments[_i];
modules[_i] = arguments[_i];
}

@@ -55,9 +56,9 @@ resolve(modules);

};
EsriLoaderService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], EsriLoaderService);
return EsriLoaderService;
}());
EsriLoaderService = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [])
], EsriLoaderService);
exports.EsriLoaderService = EsriLoaderService;
//# sourceMappingURL=esri-loader.service.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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