Create a sortable controller using Angular JS - Glenn Smith [PDF]

Oct 19, 2015 - <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js">. <script src="http:/

2 downloads 13 Views 215KB Size

Recommend Stories


Angular JS Advanced
Live as if you were to die tomorrow. Learn as if you were to live forever. Mahatma Gandhi

Using D3.js with React
Make yourself a priority once in a while. It's not selfish. It's necessary. Anonymous

Create Anaglyphs Using ArcScene
Learn to light a candle in the darkest moments of someone’s life. Be the light that helps others see; i

Create a Report Using Shared Objects
What you seek is seeking you. Rumi

BP Energol JS-A
So many books, so little time. Frank Zappa

BP Energol JS-A
Everything in the universe is within you. Ask all from yourself. Rumi

traffic light controller using 8051 pdf download
Every block of stone has a statue inside it and it is the task of the sculptor to discover it. Mich

Learning Ext JS 4 Pdf
Don't fear change. The surprise is the only way to new discoveries. Be playful! Gordana Biernat

Glenn Egan
Where there is ruin, there is hope for a treasure. Rumi

Create Booklet PDF Service
Never wish them pain. That's not who you are. If they caused you pain, they must have pain inside. Wish

Idea Transcript


Glenn Smith

Create a sortable controller using Angular JS 19 Oct 2015 Home / Create a sortable controller using Angular JS

If like me you want to add the jQuery UI sortable functionally to your Angular JS application then you can do this by using a controller in angular. This controller will setup the sortable functionally you need and you can use it just how you would when using the jQuery UI code.

The HTML The HTML below is the base of our Angular JS appliation this calls in jQuery, jQuery UI, Angular JS, UI Sortable & our custom js file which will later house our Angular JS controller code.

You may notice on the html tag we are referencing two Angular JS tags ng-app & ng-controller. Let go ahead and setup the ng-app tag. In our custom js file add the following code. This give creates our application a namespace and tell it we want to include UI sortable.

The controller This controller allows us to setup our sortable functionally and assign a div handle which you can hover over and click and drag to a new order. Add the following code to our custom js file.

Using the sortable UI functionally To start using the sortable functionally simply use the following HTML code within the body of your Angular JS application. Whatever you put between the li tags will now be sortable.

Create a sortable controller using Angular Source : https://github.com/angular-ui/ui-sortable

Glenn Smith

© 2017, All Rights Reserved - Glenn Smith Follow @g13nnsmith

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.