fa-flipper
This directive will create a Famo.us Flipper containing the
specified front and back elements. The provided options
object
will pass directly through to the Famo.us Flipper's
constructor. See [https://famo.us/docs/views/Flipper]
Usage
<fa-flipper fa-options="scopeOptionsObject">
<!-- two render nodes -->
</fa-flipper>
Example
A Famous Flipper has a .flip()
method that toggles a rotation between front and back sides.
In the example below, when an fa-surface
is clicked, it calls the function flipIt
.
This function attempts a DOM lookup for an isolate of an fa-flipper
element, and calls the .flip()
function of fa-flipper
.
<fa-flipper>
<fa-surface fa-background-color="'yellow'" fa-click="flipIt()"></fa-surface>
<fa-surface fa-background-color="'red'" fa-click="flipIt()"></fa-surface>
</fa-flipper>
$scope.flipIt = function() {
$famous.find('fa-flipper')[0].flip();
};