# think-of-the-children

> An AngularJS component decorator function that allows placing child components and directives on a component definition directly.

Latest version **1.0.2** (published 2018-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install think-of-the-children
pnpm add think-of-the-children
yarn add think-of-the-children
bun add think-of-the-children
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-06-11 |
| First published | 2018-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Seth White |
| Maintainers | hyrumwhite |
| Keywords | angularjs, decorator, components, children |

## Links

- npm: https://www.npmjs.com/package/think-of-the-children
- Repository: https://github.com/hyrumwhite/think-of-the-children
- Homepage: https://github.com/hyrumwhite/think-of-the-children#readme
- Issues: https://github.com/hyrumwhite/think-of-the-children/issues
- npm.io page: https://npm.io/package/think-of-the-children

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-06-11
- 1.0.1 — 2018-06-11
- 1.0.0 — 2018-06-11

## README

# think-of-the-children
An AngularJS decorator that allows placing children components on the component definition directly, instead of messing around with modules.

# Installation
> npm i think-of-the-children -S

# Usage

Remind your app to think of its children by passing it to the ThinkOfTheChildren function. The following example uses ES6 modules, but think of the children will work with any project configuration. Your components just need a `components` attribute and/or a `directives` attribute.

The component definition:

    //todo.component.js
    import ChildComponent from './child-component.js';
    import OtherChild from './other-child.js';
    export default {
        components:{
    	    ChildComponent,//ThinkOfTheChildren makes capitalization ok now
    	    OtherChild
        },
        directives:{//this works too!
        },
        template:`
    	    <div>
    		    <child-component></child-component>
    		    <other-child></other-child>
    	    </div>
        `
    }

The App definition:

    //app.module.js
    import ThinkOfTheChildren from 'think-of-the-children';
    const app = angular.module('my-app')
    ThinkOfTheChildren(app)
    	.component(MyComponentWithChildren)//that's it!

You can also import ThinkOfTheChildren in a script tag

    <script src="path/to/ToTC/dist/think-of-the-children.js"

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