# angular-on-screen

> Angular directive which checks if an element is within a certain range of viewport

Latest version **0.1.3** (published 2016-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-on-screen
pnpm add angular-on-screen
yarn add angular-on-screen
bun add angular-on-screen
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-02-10 |
| First published | 2016-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Homerjam |
| Maintainers | homerjam |

## Links

- npm: https://www.npmjs.com/package/angular-on-screen
- Repository: https://github.com/homerjam/angular-on-screen
- Homepage: https://github.com/homerjam/angular-on-screen#readme
- Issues: https://github.com/homerjam/angular-on-screen/issues
- npm.io page: https://npm.io/package/angular-on-screen

## Dependencies (1)

- [angular](https://npm.io/package/angular.md) >=1.2.0

## Recent versions

- 0.1.3 (latest) — 2016-02-10
- 0.1.2 — 2016-02-09
- 0.1.1 — 2016-02-08
- 0.1.0 — 2016-02-08

## README

# angular-on-screen

Angular directive which checks if an element is within a certain range of viewport

## Installation

`$ bower install angular-on-screen --save`

## Usage

	// `scroller` defaults to the window

	// optionally override `range` with `rangeTop` / `rangeBottom`

	// scope defaults to directive $scope but can be passed alternative object/scope to set properties on (eg. for ng-repeat)

	// if `className` is set this class will be applied to the directive $element if in range

	<div class="scroller" style="overflow: scroll">

		<div ng-repeat="image in images" hj-on-screen="{scroller: '.scroller', scope: image, range: 1000, className: 'on-screen'}">

			<img ng-if="image.$onScreen" ng-src="{{image.src}}">

		</div>

	</div>

## License

MIT

---
_Source: https://npm.io/package/angular-on-screen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
