Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Make installable with webpack #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Install **ng-inline-edit** via [Bower](http://bower.io):
```bash
bower install ng-inline-edit --production
```
or
```bash
npm install ng-inline-edit --save
```

Include main files:
```html
Expand All @@ -23,6 +27,15 @@ angular
]);
```

Or when you're using Webpack and installed via npm, skip the script tag and

```js
import ngInlineEdit from 'ng-inline-edit'
import 'ng-inline-edit/dist/ng-inline-edit.css'

angular.module('myApp', [ngInlineEdit])
```

Pass your model to ``inline-edit`` attribute on your HTML element and provide a callback function to listen changes:
```html
<span inline-edit="yourModel"></span>
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('./dist/ng-inline-edit');
module.exports = 'angularInlineEdit';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ng-inline-edit",
"description": "Simple inline editing for HTML elements",
"version": "0.7.0",
"main": "dist/ng-inline-edit.js",
"main": "index.js",
"keywords": [
"angular",
"component",
Expand Down