PatrickJS / NG6-starter

:ng: An AngularJS Starter repo for AngularJS + ES6 + Webpack
https://angularclass.github.io/NG6-starter
Apache License 2.0
1.91k stars 1.35k forks source link

use of "ngInject"; #115

Closed slmyers closed 8 years ago

slmyers commented 8 years ago

I'm confused by the use of "ngInject"; here

angular.module('app',` [
    uiRouter,
    Components.name
  ])
  .config(($locationProvider) => {
    "ngInject";
    // @see: https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions
    // #how-to-configure-your-server-to-work-with-html5mode
    $locationProvider.html5Mode(true).hashPrefix('!');
  })

  .component('app', AppComponent);

Does this string execute code or is it there for some type of exposition?

fesor commented 8 years ago

https://github.com/olov/ng-annotate#es6-and-typescript-support