title: Cannot find namespace 'ng'
body: <p>I am rewriting simple angular 1.6 project to typescript. I have declared typings dependencies and they are compiled and installed. Despite that there is compilation error "Cannot find namespace 'ng'" in my service.
  Angular name is also not recognized.</p>
  
  <p><a href="https://i.stack.imgur.com/sTpf1.png" rel="nofollow noreferrer">Screenshot</a></p>
  
  <p>tsconfig.json</p>
  
  <pre><code>{
      "files": [
          "app/**/*.ts",
          "app/**/*.js",
          "main.js",
          "renderer.js"
      ],
      "compilerOptions": {
          "target": "es5",
          "module": "commonjs",
          "moduleResolution": "node",
          "sourceMap": true,
          "declaration": false,
          "noImplicitAny": false,
          "allowJs": false,
          "rootDir": ".",
          "typeRoots": ["./typings"] 
      }
  }
  </code></pre>
  
  <p>typings.json</p>
  
  <pre><code>{
    "dependencies": {
      "angular": "registry:dt/angular#1.6.0+20170321201455"
    },
    "globalDependencies": {
      "jquery": "registry:dt/jquery#1.10.0+20170310222111"
    }
  }
  </code></pre>
  
  <p>service.ts</p>
  
  <pre><code>module Services {
  
      export interface IMyService {
      }
  
      export class MyService {
  
          http: ng.IHttpService;
          location: ng.ILocationService;
  
          constructor($http: ng.IHttpService, $location: ng.ILocationService) {
              this.http = $http;
              this.location = $location;
          }
  
      }
  }
  </code></pre>