1

I am trying to add modernizr support to my angular2 project. I have configured the tsconfig, webpack.config, package.json and build is working fine.

But I am not able to figure out how to use Modernizr via importing in the module.

If some code snippets or configs are required then please let me know.

versions: "modernizr" : "3.3.1" "@types/modernizr": "3.3.0" "@angular/common": "~4.1.3"

Sumit Agarwal
  • 4,091
  • 8
  • 33
  • 49
  • https://www.npmjs.com/package/modernizr Check this issue : https://stackoverflow.com/questions/42701637/angular-cli-error-in-console – Julo0sS Jun 15 '17 at 07:09
  • Thanks for the link, but what i am trying to achieve over here is that I wanna display custom messages to users based on different types of supports. So just importing the complete js doesn't helps the cause. – Sumit Agarwal Jun 15 '17 at 07:21
  • 1
    https://stackoverflow.com/questions/38107629/angular2-with-modernizr – Julo0sS Jun 15 '17 at 07:25
  • Thanks for the link, it really helped! – Sumit Agarwal Jun 15 '17 at 13:34

1 Answers1

-2

import like below:

import * as Modernizr from 'modernizr';
Sreeketh K
  • 21
  • 4