title: How to generate UUID with angular 2?
body: <p>I'm using Angular 2 for a signup form:
  first name, last name, email and password.</p>
  
  <p>After submit, the data is being stored via API call in a database (nodeJs and mongo) and generates a JWT Token which is sent back to the client. </p>
  
  <p>Now I should add/generate an UUID (Universal Unique Identifier). As I never have done this kind of feature before, I need an approach and idea/solution how to achieve this... would the JWT Token be a kind of alternative to UUID? If yes, this would be enough. </p>
  
  <p>Otherwise I would prefer to avoid any big changes on the form or its functionality.</p>
  
  <p>I Have been searching, but didn't find a useful solution. I tried the npm package <code>angular2-uuid</code>, but after installing it as dependency, the <code>ng build -prod</code> throws an error which isn't clear.</p>
  
  <pre><code>import { UUID } from 'angular2-uuid';
  ....
  let uuid = UUID.UUID();
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>ERROR in ./~/@angular/flex-layout/@angular/flex-layout.es5.js Module
         build failed: Error: ENOENT: no such file or directory, open
         '/Users/username/dev/app/node_modules/@angular/flex-
        layout/@angular/flex-layout.es5.js' @ 
        ./src/$$_gendir/app/app.module.ngfactory.ts 25:0-44 @ ./src/main.ts @
         multi webpack-dev-server/client?<a href="http://localhost:4200" rel="noreferrer">http://localhost:4200</a> ./src/main.ts</p>
  </blockquote>
  
  <p>Any idea or Hint please?</p>