Monday, 9 September 2013

Right place to detect browser and show/hide a div

Right place to detect browser and show/hide a div

I want to show a div (using ng-if or ng-show/hide) if the user opens the
page in a certain browser (in this case, chrome/chormium), and I'm not
really sure where is the best place.
The javascript code looks like this: /chrome/i.test( navigator.userAgent
), but where is the best place to place it? In a filter? In a controller?
In a directive?

No comments:

Post a Comment