In my last article we discuss on how to use popover in angular application. In these tutorial i discuss on how to create sortable elements in Angular application.
First we need to add below line in our app.module.ts file.
........
import { SortableModule } from 'ngx-bootstrap';
........
@NgModule({
imports: [SortableModule.forRoot(),...]
})
export class AppModule(){}
After adding SortableModule in the app module file. Now we can use in any component.Let’s create Basic code for the sort-able elements.
In above Basic example item only a single element like “Item 1″,”Item 2”. You can pass Json string with multiple field like “{ id: 1, title: ‘Item 1’ }”. Code display like below.
Output of the above codes display in below video.