# angular-inject

> A JS decorator (@inject) for injecting dependencies inside your angular classes

Latest version **1.1.1** (published 2015-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-inject
pnpm add angular-inject
yarn add angular-inject
bun add angular-inject
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2015-07-24 |
| First published | 2015-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Christian Martin |
| Maintainers | cmartin81 |
| Keywords | angular, dependency, injection, DI, ES2016, angularjs, inject, @inject |

## Links

- npm: https://www.npmjs.com/package/angular-inject
- Repository: https://github.com/cmartin81/angular-inject
- Issues: https://github.com/cmartin81/angular-inject/issues
- npm.io page: https://npm.io/package/angular-inject

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2015-07-24
- 1.1.0 — 2015-07-12
- 1.0.0 — 2015-07-12
- 0.1.0 — 2015-07-11

## README

[![Build Status](https://travis-ci.org/cmartin81/angular-inject.svg?branch=master)](https://travis-ci.org/cmartin81/angular-inject)

# angular-inject
A angular decorator for angular dependency injection.

## Install
    $ npm install --save angular-inject 
 
## Usage
    // ES2016 style
    import {inject} from 'angular-inject'

    // CommonJS style
    let inject = require('angular-inject').inject;


    @inject( ['$base64', 'foobar'] )
    class FooBarController {
        constructor(){  /if needed you can also access the injected variables here also (ie constructor(base64, foobar) )  
            ....
            ....
            ....
        }
        
        bar() {
            this.$base64.encode('babba');
        }
    }
    

## Note
You need to run babel with the option 'es7.decorators' enabled.

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