New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ng-location-picker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-location-picker

This library for angular 4 allows the user to select a geographical location in a map. You just have to use the directive on any HTML element that can trigger a click event.

latest
Source
npmnpm
Version
0.1.9
Version published
Weekly downloads
4
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

ng-location-picker

This library for angular 4 allows the user to select a geographical location in a map. You just have to use the directive on any HTML element that can trigger a click event.

Installation

To install this library, run:

$ npm install ng-location-picker --save

First of all you have to include the google maps libraries in your application

<script src="https://maps.googleapis.com/maps/api/js?libraries=places"></script>
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {Component} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import LatLng = google.maps.LatLng;
import {LocationPickerModule} from "ng-location-picker";

@Component({
    selector: 'app',
    template: `
        <input ng-location-picker (onPickedLocation)="logPickedLocation($event)">`
})
class AppComponent {
    static logPickedLocation(location: LatLngLiteral) {
        console.log(location);
    }
}

@NgModule({
    bootstrap: [AppComponent],
    declarations: [AppComponent],
    imports: [BrowserModule, LocationPickerModule]
})
class AppModule {
}

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Víctor Rodriguez

Keywords

angular

FAQs

Package last updated on 18 Apr 2018

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