1

I am trying to access the window object of the browser with Angular 2. I have seen some solutions on stack overflow but they don't work with NgModules (Angular 2 RC5 version).

I just want to detect the browser (chrome, firefox, safari, opera, IE) and put it as a class in <body> tag

Any pointers please?

Hassan
  • 2,308
  • 5
  • 21
  • 31
  • 1
    http://stackoverflow.com/questions/34177221/angular2-how-to-inject-window-into-an-angular2-service – Vineet Aug 30 '16 at 10:43
  • I did try that method and it didn't work. Initiallizing in the constructor gives error. – Hassan Aug 30 '16 at 10:57

0 Answers0