File tree Expand file tree Collapse file tree 1 file changed +33
-36
lines changed
Expand file tree Collapse file tree 1 file changed +33
-36
lines changed Original file line number Diff line number Diff line change 11# Ng2Draggable
22A angular2 directive provide html block to move block on html plain.
33
4- # USES
4+ ## Usages
55
6- > Using NgModule
7-
8-
9- <code >
10- <br >import {DraggableModule} from 'ng2-draggable';
11- <br >@NgModule ({
12- <br > imports: [
13- <br > ....,
14- <br > DraggableModule
15- <br > ] ,
16- <br > declarations: [ YourAppComponent ] ,
17- <br > exports: [ YourAppComponent] ,
18- <br > bootstrap: [ YourAppComponent] ,
19- <br >})
20- </code >
21-
22- #### For more information have a look at example files.
23-
24- > Basic
25- ` import {Draggable} from 'ng2-draggable'; `
26-
27- ` @Component({ `
28- ` template:'<div [draggable]> I am a draggable component.</div>', `
29- ` directives: [Draggable] `
30- ` }) `
31- ...`
32-
33- > OR
34-
35- `@Component({
36- templateUrl:'x.template.html',
37- directives: [ Draggable]
6+ ``` js
7+ import { Ng2DraggableModule } from ' ng2-draggable' ;
8+ @NgModule ({
9+ imports: [
10+ ... .,
11+ Ng2DraggableModule
12+ ],
13+ declarations: [YourAppComponent ],
14+ exports: [YourAppComponent],
15+ bootstrap: [YourAppComponent],
3816})
39- ...`
17+ ... ..
4018
41- > in ` x.template.html `
4219
43- ` <div [draggable]> I am a draggable component.</div> `
20+ `` `
4421
22+ ``` html
23+ <div draggable >
24+ content
25+ </div >
4526
27+ ```
28+
29+
30+ ``` html
31+ <div draggable =" true" >
32+ content
33+ </div >
34+
35+ ```
36+
37+ ``` html
38+ <div draggable =" false" >
39+ content
40+ </div >
41+
42+ ```
4643# Example
4744 [ #demo] ( https://coderajay.github.io/ng2Draggable )
4845
You can’t perform that action at this time.
0 commit comments