fa-image-surface

This directive creates a Famo.us ImageSurface and loads the specified ImageUrl.

Usage

<fa-image-surface fa-image-url="img/my-image.png">
</fa-image-surface>

API

Attr Type Details
faImageUrl String

String url pointing to the image that should be loaded into the Famo.us ImageSurface

Example

To use fa-image-surface, declare an fa-image-url attribute with a string url.

  Edit in Plunker
<fa-app>
  <fa-image-surface
             fa-image-url="/integrations/angular/img/famous-angular-logos.png"
             class="img"
             fa-color="'blue'"
             fa-background-color="'#fff'"
             fa-size="[500, 200]">
  </fa-image-surface>
</fa-app>
angular.module('faImageSurfExampleApp', ['famous.angular']);
fa-app {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

Fa-image-surface accepts two css-style properties: color and background color, which may be assigned values by the fa-color and fa-background-color attributes respectively.

Fa-size may also be declared as an attribute. If void, the fa-image-surface will inherit the size of its parent node.