https://github.com/paulrosset/ngshowon
A simple angular directive to show/hide element according to the size of the window.
https://github.com/paulrosset/ngshowon
angular directives
Last synced: 2 months ago
JSON representation
A simple angular directive to show/hide element according to the size of the window.
- Host: GitHub
- URL: https://github.com/paulrosset/ngshowon
- Owner: PaulRosset
- Created: 2017-01-31T14:12:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T14:16:37.000Z (over 9 years ago)
- Last Synced: 2025-08-01T06:03:51.246Z (11 months ago)
- Topics: angular, directives
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Directive ngShowOn
A simple angular directive to show/hide element according to the size of the window.
## Getting Started
### Installing
You can install it via bower with :
```
bower install ngshowon
```
or just clone the project on github :
```
https://github.com/PaulRosset/ngshowon.git
```
### Prerequisites
Once download, Include the file :
```
...
...
```
and integrate it in your main module angular as dependencies :
```
var myApp = angular.module('myApp', ['ngShowOn']);
```
### Example of use
Now, you can use as you want on any html element like this :
```
Hello World
```
In this example the element will be shown only for tablet device.
Another example for mobile device
```
Hello here
```
For the moment, the arguments available are :
- tablet
- desktop
- mobile
By default, if no value are passed, the element is hidden on all devices.
## Tips
This is my first time that I post code on github, so I would appreciate if you do remark about the code.
Thank's in advance.
## Authors
* **Paul Rosset**