An open API service indexing awesome lists of open source software.

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.

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**