Skip to content

Commit bd16144

Browse files
committed
update readme
1 parent c1e59ed commit bd16144

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ None except for AngularJS.
1010

1111
### Install
1212

13-
`bower install angular-bowser`
13+
`bower install --save angular-bowser`
14+
15+
OR
16+
17+
`npm install --save angular-bowser`
1418

1519
### Usage
1620

1721
Include src/angular-bowser.js in your html.
1822

1923
```html
20-
<script src="bower_components/angular-bowser/src/angular-bowser.js"></script>
24+
<script src="node_modules/angular-bowser/src/angular-bowser.js"></script>
2125
```
2226

2327
Add the angular-bowser module as a dependency to your application module:
@@ -30,13 +34,15 @@ Inject the service where you need it. A good place is in the run section of your
3034

3135
```javascript
3236
angular.module('MyApp')
33-
.run(['bowser', function(bowser) {
37+
.run(['bowser', function(bowser) {
3438

35-
if ( bowser.msie && bowser.version <= 6 ) {
36-
alert('Seriously?!');
37-
}
39+
if ( bowser.msie && bowser.version <= 6 ) {
40+
41+
alert(`${bowser.name}, Seriously?!`);
42+
43+
}
3844

39-
}]);
45+
}]);
4046
```
4147

4248
### Properties
@@ -46,3 +52,7 @@ Example of properties are: firefox, chrome, msie, opera, android, ios, safari
4652
The browser version is always in the version property.
4753

4854
For more information, please check [bowser](https://github.com/ded/bowser).
55+
56+
### See also
57+
58+
[ng-device-detector](https://github.com/srfrnk/ng-device-detector)

0 commit comments

Comments
 (0)