0.4.1 • Published 8 years ago

angular2-resizable v0.4.1

Weekly downloads
13
License
MIT
Repository
github
Last release
8 years ago

angular2 resizable

Build Status npm version devDependency Status GitHub issues GitHub stars GitHub license

Demo

https://mattlewis92.github.io/angular2-resizable/demo/

Table of contents

About

An angular2 directive that allows an element to be dragged and resized

Installation

Install through npm:

npm install --save angular2-resizable

Then use it in your app like so:

import {Component} from '@angular/core';
import {ResizeEvent} from 'angular2-resizable';

@Component({
  selector: 'demo-app',
  // you should add some styles to the element. See the demo folder for a more fleshed out example
  template: '<div mwlResizable (resizeEnd)="onResizeEnd($event)"></div>'
})
export class MyComponent {

  onResizeEnd(event: ResizeEvent): void {
    console.log('Element was resized', event);
  }

}

// now use within your apps module
import {NgModule} from '@angular/core';
import {ResizableModule} from 'angular2-resizable';

@NgModule({
  declarations: [MyComponent],
  imports: [ResizableModule],
  bootstrap: [MyComponent]
})
class MyModule {}

You may also find it useful to view the demo source.

Usage without a module bundler

<script src="node_modules/angular2-resizable/angular2-resizable.js"></script>
<script>
    // everything is exported on the  angular2Resizable namespace
</script>

Documentation

All documentation is auto-generated from the source via typedoc and can be viewed here: https://mattlewis92.github.io/angular2-resizable/docs/

Development

Prepare your environment

  • Install Node.js and NPM (should come with)
  • Install local dev dependencies: npm install while current directory is this repo

Development server

Run npm start to start a development server on port 8000 with auto reload + tests.

Testing

Run npm test to run tests once or npm run test:watch to continually run tests.

Release

  • Bump the version in package.json (once the module hits 1.0 this will become automatic)
npm run release

License

MIT

0.4.1

8 years ago

0.4.0

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago