Package Exports
- angular-resizable-element
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angular-resizable-element) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
angular resizable element
Demo
https://mattlewis92.github.io/angular-resizable-element/demo/
Table of contents
About
An angular 2.0+ directive that allows an element to be dragged and resized
Installation
Install through npm:
npm install --save angular-resizable-element
Then use it in your app like so:
import {Component} from '@angular/core';
import {ResizeEvent} from 'angular-resizable-element';
@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
[enableGhostResize]="true"
[resizeEdges]="{bottom: true, right: true, top: true, left: true}"
(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 'angular-resizable-element';
@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/angular-resizable-element/angular-resizable-element.js"></script>
<script>
// everything is exported on the angularResizableElement namespace
</script>
Documentation
All documentation is auto-generated from the source via typedoc and can be viewed here: https://mattlewis92.github.io/angular-resizable-element/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