June 2014
Intermediate to advanced
696 pages
38h 52m
English
With the richDraggable directive defined in the AngularJS Module object, you can implement it in your views by simply including the rich-draggable directive in the HTML element definition. For example, to drag a paragraph around, you could use:
<p rich-draggable>My draggable paragraph.</p>
Listing 29.14 shows the implementation used in the example shown in Figure 29.3. It is very basic—just a series of <img> and <span> elements that use the rich-draggable directive.
Listing 29.14 draggable.html: Implementing an AngularJS template for the draggable view
01 <img class="dragImage" rich-draggable src="/images/arch.jpg" />02 <img ...
Read now
Unlock full access