title: Getting started - How to use Google maps api with angular-cli
body: <p>I recently got started with ng2. So I created a project using angular-cli, then I realized I need some third party modules. Such as Google maps api, lodash, jquery...etc. I know the basics of Typescript, but how do I use these modules in an Angular2 app? Also, I want to use just the library, for example Google maps api, not any existing ng2 module/component someone else made ontop of the Google maps api - For the sake of learning.</p>
  
  <p>Previously, with just JS I would include the js file and reference the api documentation to know which methods to reference and build my app. Now with Angular2, what steps should I take to do the same?</p>
  
  <p>From my research it looks like I first install the type script files needed.
  so for Google maps I did <code>npm install --save @types/google-maps</code>.
  Now, do I need to import this module into my angular app by including it in app.module.ts? In the imports array? Or is it now globally available?</p>
  
  <p>One source mentioned installing it with npm and in my angular-cli.json including a reference to that library in the scripts array. like so:</p>
  
  <pre><code>"scripts": ['./node_modules/googlemaps/googemaps.min.js'],
  </code></pre>
  
  <p>Which method to use in installing the google maps api? I would think Typescript might be the way to go since the rest of the Angular app is going to be written in Typescript.</p>
  
  <p>Now in my app.component.ts, I want to create a simple map using the typescript I installed. How would I do so? The google maps api says to create a new instance of the map like so.</p>
  
  <pre><code>var map = new google.maps.Map(document.getElementById('map'), {
            center: {lat: -34.397, lng: 150.644},
            scrollwheel: false,
            zoom: 8
          });
  </code></pre>
  
  <p>How would I do that with the typescript version of Googlemaps I just installed?</p>
  
  <p>Would a typescript version of Googlemaps have all the same methods as the original API? Do typescripts of popular JS libraries have a documentation site I can reference?</p>