title: Angular module from npm missing @NgModule declaration
body: <p>A module from NPM is missing @NgModule, @Directive declarations, though it is in the source code on Github. This is preventing me from importing a directive to databind from an HTML attribute.</p>
  
  <hr>
  
  <p>I'm trying to use the angular-gtag package to log custom dimensions to Google Analytics using the [params] attribute as defined in the readme here: <a href="https://github.com/codediodeio/angular-gtag" rel="nofollow noreferrer">https://github.com/codediodeio/angular-gtag</a></p>
  
  <pre><code>&lt;div gtagEvent trackOn="click" action="myAction" [params]="{ myDimension: myDimensionValue}"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Where myDimensionValue is a variable of the containing component.</p>
  
  <p>This causes an error:</p>
  
  <pre><code>Template parse errors:
  Can't bind to 'params' since it isn't a known property of 'div'.
  </code></pre>
  
  <p>Reading up on this error (such as here: <a href="https://stackoverflow.com/questions/43131227/angular-4-cant-bind-to-property-since-it-isnt-a-known-property-of-component">Angular 4 Can&#39;t bind to &lt;property&gt; since it isn&#39;t a known property of &lt;component&gt;</a> or here: <a href="https://stackoverflow.com/questions/43522877/cant-bind-to-x-since-it-isnt-a-known-property-of-y">Can&#39;t bind to &#39;x&#39; since it isn&#39;t a known property of &#39;y&#39;</a>) leads to the suggestion that I need to add the GtagEventDirective class to the declarations in app.module.ts. </p>
  
  <p>However, doing that leads to the error</p>
  
  <pre><code>Unexpected module 'GtagModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation
  </code></pre>
  
  <p>Looking in the source of the package in node_modules, any @Component or @Directive annotations are absent. Strangely enough, they are present in the module's source code on Github: <a href="https://github.com/codediodeio/angular-gtag/blob/master/lib/src/gtag-event.directive.ts" rel="nofollow noreferrer">https://github.com/codediodeio/angular-gtag/blob/master/lib/src/gtag-event.directive.ts</a> and <a href="https://github.com/codediodeio/angular-gtag/blob/master/lib/src/gtag.module.ts" rel="nofollow noreferrer">https://github.com/codediodeio/angular-gtag/blob/master/lib/src/gtag.module.ts</a></p>
  
  <p>So what can I do here? Editing the code in node_modules doesn't seem like the best idea and changes here may not even be picked up as there are already transpiled files in the package.</p>
  
  <p>I tried reinstalling the package. I'm certain I have the latest version (1.0.3) and the source in Github also lists that version as the latest.</p>
  
  <p>Of course I could create an issue in the Github repo, but the source code there is correct. Any change I could ask for is already in there. My problem seems to be somewhere between NPM and my machine.</p>