From 5783027af3ad457626917e542d7e90c8a34cab7e Mon Sep 17 00:00:00 2001
From: Thuongvu Ho Scroll me back! Scroll me! Declaring
+
+{% assign lvl = page.url | append:'X' | split:'/' | size %}
+{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
+
+Example
Fa-app
creates a Famous Context, the root of the Render Tree. Renderables (such as fa-modifier
's & fa-surface
's) nested within an fa-app
are added to this root context. fa-app
appends a div with the class of "famous-angular-container"
to the DOM. It then instantiates a Context via Famous' Engine .createContext()
method, passing in a reference to the famous-angular-container
div, resulting in a Famous context that renderables can be added to connected to Angular. Fa-app
can be declared as an element or as an attribute within another element.
+<fa-app style="width: 320px; height: 568px;">
- <fa-modifier>
- <fa-surface>This will be shown on screen.</fa-surface>
- </fa-modifier>
- <div>This will not appear on screen because it is not inside an fa-surface.</div>
-</fa-app>
+ {% raw %} <fa-app>
<fa-modifier>
<fa-surface>This will be shown on screen.</fa-surface>
</fa-modifier>
<div>This will not appear on screen because it is not inside an fa-surface.</div>
</fa-app>{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ {% raw %}angular.module('faAppExampleApp', ['famous.angular']);{% endraw %}
Nesting an fa-app
within another fa-app
is possible, and the use case of this approach would be for css content overflow.
In the example below, there is an fa-surface
with an fa-app
nested inside. Normally, an fa-surface
should not nest another Famous element within it because it is a leaf node that has the purpose of being a container for html content. The exception is nesting an fa-app
within an fa-surface
, which creates another Famous context, in which Famous elements can be nested inside.
<fa-app style="width: 500px; height: 500px;">
- <fa-surface>
- <fa-app style="width: 200px; height: 200px;">
- <fa-image-surface
- fa-image-url="https://famo.us/assets/images/famous_logo_white.svg"
- fa-size="[400, 400]">
- </fa-image-surface>
- </fa-app>
- </fa-surface>
-</fa-app>
-The outer fa-app
is sized 500x500, and it contains all of the content. The use case of this fa-app
within another fa-app
is to clip content using the css overflow:hidden property. The fa-image-surface
links to a 400x400 sized image of the Famous logo. Its parent is the nested fa-app
, whose size is only 200x200.
In the example below, there is an fa-surface
with an fa-app
nested inside. Normally, an fa-surface
should not nest another Famous element within it because it is a leaf node that has the purpose of being a container for html content. The exception is nesting an fa-app
within an fa-surface
, which creates another Famous context, in which Famous elements can be nested inside.
+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app style="width: 500px; height: 500px;">
<fa-surface>
<fa-app style="width: 200px; height: 200px; overflow: hidden;">
<fa-image-surface
fa-image-url="https://famo.us/assets/images/famous_logo_white.svg"
fa-size="[400, 400]">
</fa-image-surface>
</fa-app>
</fa-surface>
</fa-app>{% endraw %}
+ {% raw %}fa-app {
background-color: #000;
}{% endraw %}
+ {% raw %}angular.module('faAppExampleAppA', ['famous.angular']);{% endraw %}
+ fa-app
is sized 500x500, and it contains all of the content. The use case of this fa-app
within another fa-app
is to clip content using the css overflow:hidden property. The fa-image-surface
links to a 400x400 sized image of the Famous logo. Its parent is the nested fa-app
, whose size is only 200x200.
The larger image content (400x400) will overflow the boundaries of its parent, the the nested fa-app
(200x200). Because fa-app
has a css overflow:hidden property, it will clip the content of any of its children that is outside the 200x200 region. Any part of the 400x400 image that reaches outside of these boundaries are ignored. This may be useful for complex animations.
Take note: declaring multiple fa-app
s within a page is permitted, but each new one incurs a penalty for performance. fa-app
is similar to a Famo.us ContainerSurface, in that it creates an additional Context that the Famo.us Engine must manage.
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();
-};
++ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app ng-controller="FlipperCtrl">
<fa-flipper>
<fa-modifier fa-size="[200, 200]">
<fa-surface fa-background-color="'yellow'" fa-click="flipIt()">Click me to see me flip!</fa-surface>
</fa-modifier>
<fa-modifier fa-size="[200, 200]">
<fa-surface fa-background-color="'red'" fa-click="flipIt()">Flip me again!</fa-surface>
</fa-modifier>
</fa-flipper>
</fa-app>{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
div {
cursor: pointer;
padding: 8px 8px;
}{% endraw %}
+ {% raw %}angular.module('faFlipperExampleApp', ['famous.angular'])
.controller('FlipperCtrl', ['$scope', '$famous', function($scope, $famous) {
$scope.flipIt = function() {
$famous.find('fa-flipper')[0].flip();
};
}]);{% endraw %}
+ A Famous Grid Layout divides a context into evenly-sized grid cells. Pass an option such as dimension
by binding an object with the property to fa-options
.
In the example below, fa-options
references myGridLayoutOptions
on the scope.
$scope.myGridLayoutOptions = {
- dimensions: [2,2], // specifies number of columns and rows
-};
-In the example below, fa-size
is specified as [100, 100]
, so each fa-surface
will have these dimensions.
<fa-grid-layout fa-options="myGridLayoutOptions">
- <fa-modifier ng-repeat="grid in grids"
- fa-size="[100, 100]">
- <fa-surface fa-background-color="grid.bgColor"></fa-surface>
- </fa-modifier>
-</fa-grid-layout>
-$scope.grids = [{bgColor: "orange"}, {bgColor: "red"}, {bgColor: "green"}, {bgColor: "yellow"}];
+In the example below, fa-options
references myGridLayoutOptions
on the scope. The dimensions property has a value of [2,2]
which specifies the columns and rows. fa-size
is specified as [100, 100]
on the fa-modifier, so each fa-surface
will have these dimensions.
+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app ng-controller="GridCtrl">
<fa-grid-layout fa-options="myGridLayoutOptions">
<fa-modifier ng-repeat="grid in grids"
fa-size="[100, 100]">
<fa-surface fa-background-color="grid.bgColor"></fa-surface>
</fa-modifier>
</fa-grid-layout>
</fa-app>{% endraw %}
+ {% raw %}angular.module('faGridExampleApp', ['famous.angular'])
.controller('GridCtrl', ['$scope', function($scope) {
$scope.myGridLayoutOptions = {
dimensions: [2,2], // specifies number of columns and rows
};
$scope.grids = [{bgColor: "orange"}, {bgColor: "red"}, {bgColor: "green"}, {bgColor: "yellow"}];
}]);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ If fa-size
is not specified, as in this example below, the fa-surface's will collectively fill the height and width of its parent modifier/context.
<fa-grid-layout fa-options="myGridLayoutOptions">
- <fa-surface ng-repeat="grid in grids" fa-background-color="grid.bgColor"></fa-surface>
-</fa-grid-layout>
++ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app ng-controller="GridCtrlA">
<fa-grid-layout fa-options="myGridLayoutOptions">
<fa-surface ng-repeat="grid in grids" fa-background-color="grid.bgColor"></fa-surface>
</fa-grid-layout>
</fa-app>{% endraw %}
+ {% raw %}angular.module('faGridExampleAppA', ['famous.angular'])
.controller('GridCtrlA', ['$scope', function($scope) {
$scope.myGridLayoutOptions = {
dimensions: [2,2], // specifies number of columns and rows
};
$scope.grids = [{bgColor: "orange"}, {bgColor: "red"}, {bgColor: "green"}, {bgColor: "yellow"}];
}]);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ fa-header-footer
is a View that arranges three renderables into a header and footer area with defined sizes, and a content area that fills up the remaining space.
To use it, declare it in the html and nest 3 renderables inside. In the example below, there are three direct children elements: a Modifier (with an fa-surface
nested inside), a Surface, and another Modifier (with an fa-surface
nested inside). The order that they are declared in the html determines whether each corresponds to a header, content, and footer.
Since the header and footer Modifiers have fixed heights of [undefined, 75]
(fill the parent container horizontally, 75 pixels vertically), the content will fill the remaining height of the parent modifier or context.
<fa-header-footer-layout fa-options="{headerSize: 75, footerSize: 75}">
- <!-- header -->
- <fa-surface fa-background-color="'red'">Header</fa-surface>
+
+
+{% assign lvl = page.url | append:'X' | split:'/' | size %}
+{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
+
+
+
+
+ Edit in Plunker
+
+
+
+
+ {% raw %}<fa-app>
<fa-header-footer-layout fa-options="{headerSize: 75, footerSize: 75}">
<!-- header -->
<fa-surface fa-background-color="'red'">Header</fa-surface>
<!-- content -->
<fa-surface fa-background-color="'blue'">Content</fa-surface>
<!-- footer -->
<fa-surface fa-background-color="'green'">Footer</fa-surface>
</fa-header-footer-layout>
</fa-app>{% endraw %}
+
+
+
+ {% raw %}angular.module('faHeaderFooterExampleApp', ['famous.angular']){% endraw %}
+
+
+
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+
+
+
+
+
+
- <!-- content -->
- <fa-surface fa-background-color="'blue'">Content</fa-surface>
- <!-- footer -->
- <fa-surface fa-background-color="'green'">Footer</fa-surface>
-</fa-header-footer-layout>
+
Famo.us' HeaderFooterLayout
defaults to a vertical orientation.
-Specify a direction in the options to obtains a horizontal orientation.
<fa-header-footer-layout fa-options="{direction: 0, headerSize: 75, footerSize: 75}">
- <!-- header -->
- <fa-surface fa-background-color="'red'">Header</fa-surface>
+Specify a direction in the fa-options object to obtain a horizontal orientation.
+
+
+{% assign lvl = page.url | append:'X' | split:'/' | size %}
+{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
+
+
+
+
+ Edit in Plunker
+
+
+
+
+ {% raw %}<fa-app>
<fa-header-footer-layout fa-options="{direction: 0, headerSize: 75, footerSize: 75}">
<!-- header -->
<fa-surface fa-background-color="'red'">Header</fa-surface>
<!-- content -->
<fa-surface fa-background-color="'blue'">Content</fa-surface>
<!-- footer -->
<fa-surface fa-background-color="'green'">Footer</fa-surface>
</fa-header-footer-layout>
</fa-app>{% endraw %}
+
+
+
+ {% raw %}angular.module('faHeaderFooterExampleAppA', ['famous.angular']){% endraw %}
+
+
+
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+
+
- <!-- content -->
- <fa-surface fa-background-color="'blue'">Content</fa-surface>
+
+
+
- <!-- footer -->
- <fa-surface fa-background-color="'green'">Footer</fa-surface>
-</fa-header-footer-layout>
+
+
Fa-header-footer
works with ng-repeat'ed renderables:
<fa-header-footer-layout>
- <fa-modifier ng-repeat="view in views" fa-size="view.size" >
- <fa-surface fa-background-color="view.bgColor">
- {{view.text}}
- </fa-surface>
- </fa-modifier>
-</fa-header-footer-layout>
-$scope.views = [
-{bgColor: "red", text: "header", size: [undefined, 100]},
-{bgColor: "green", text: "content", size: [undefined, undefined]},
-{bgColor: "blue", text: "footer", size: [undefined, 100]}
-];
++ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app ng-controller="HeaderFooterCtrlB">
<fa-header-footer-layout>
<fa-modifier ng-repeat="view in views" fa-size="view.size">
<fa-surface fa-background-color="view.bgColor">
{{view.text}}
</fa-surface>
</fa-modifier>
</fa-header-footer-layout>
</fa-app>{% endraw %}
+ {% raw %}angular.module('faHeaderFooterExampleAppB', ['famous.angular'])
.controller('HeaderFooterCtrlB', ['$scope', function($scope) {
$scope.views = [
{bgColor: "red", text: "header", size: [undefined, 100]},
{bgColor: "green", text: "content", size: [undefined, undefined]},
{bgColor: "blue", text: "footer", size: [undefined, 100]}
];
}]);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ In the example above, 3 renderables are generated through an ng-repeat. The header and footer Modifier
s generated by the ng-repeat have defined sizes of [undefined, 100]
(they will fill their parent container horizontally, and be 100 pixels vertically). The content has a size of [undefined, undefined]
, and it will fill the remaining heght and width of its container.
Note:
To use fa-image-surface
, declare an fa-image-url
attribute with a string url.
<fa-image-surface
- fa-image-url="img/my-image.png"
- class="img"
- fa-color="'blue'"
- fa-background-color="'#fff'"
- fa-size="[200, 300]">
-</fa-image-surface>
+To use fa-image-surface
, declare an fa-image-url
attribute with a string url.
+
+
+{% assign lvl = page.url | append:'X' | split:'/' | size %}
+{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
+
+
{% raw %}<fa-app>
<fa-image-surface
fa-image-url="http://famo.us/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>{% endraw %}
+ {% raw %}angular.module('faImageSurfExampleApp', ['famous.angular']);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ 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.
fa-view
with the blue background color appears after the one wi
fa-scroll-view
accepts another directive called fa-start-index
as an attribute, which determines which fa-view
the Scroll View displays by default.
Fa-start-index
will not affect the sequential order of the layout; the fa-view
with the red background will be layed out first, followed by the one with the blue background.
By setting fa-start-index
to 1, the Scroll View will display the View with the index of 1, which is the View with the blue background color.
<fa-app style="width: 320px; height: 568px;">
- <!-- The scroll View will start at the index of 1 -->
- <fa-scroll-view fa-pipe-from="eventHandler" fa-options="options.scrollView" fa-start-index="1">
- <!-- Even though this view is declared first in html, it will will be layed out 2nd -->
- <!-- On page load, the scroll View will scroll to this view, and display it. -->
- <fa-view fa-index="1">
- <fa-modifier fa-size="[320, 568]">
- <fa-surface fa-pipe-to="eventHandler"
- fa-background-color="'blue'">
- </fa-surface>
- </fa-modifier>
- </fa-view>
-
- <fa-view fa-index="0">
- <fa-modifier fa-size="[320, 568]">
- <fa-surface fa-pipe-to="eventHandler"
- fa-background-color="'red'">
- </fa-surface>
- </fa-modifier>
- </fa-view>
-
- </fa-scroll-view>
- </fa-app>
-var EventHandler = $famous['famous/core/EventHandler'];
-$scope.eventHandler = new EventHandler();
-$scope.list = [{content: "famous"}, {content: "angular"}, {content: "rocks!"}];
-
-$scope.options = {
- scrollView: {
- direction: 0 // displays the fa-views horizontally
- }
-};
++ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app ng-controller="IndexCtrl">
<!-- The scroll View will start at the index of 1 -->
<fa-scroll-view fa-pipe-from="eventHandler" fa-options="options.scrollView" fa-start-index="1">
<!-- Even though this view is declared first in html, it will will be layed out 2nd -->
<!-- On page load, the scroll View will scroll to this view, and display it. -->
<fa-view fa-index="1">
<fa-modifier fa-size="[320, 320]">
<fa-surface fa-pipe-to="eventHandler"
fa-background-color="'blue'">
<p>Scroll me back!</p>
</fa-surface>
</fa-modifier>
</fa-view>
<fa-view fa-index="0">
<fa-modifier fa-size="[320, 320]">
<fa-surface fa-pipe-to="eventHandler"
fa-background-color="'red'">
<p>Scroll me!</p>
</fa-surface>
</fa-modifier>
</fa-view>
</fa-scroll-view>
</fa-app> {% endraw %}
+ {% raw %}angular.module('faIndexExampleApp', ['famous.angular'])
.controller('IndexCtrl', ['$scope', '$famous', function($scope, $famous) {
var EventHandler = $famous['famous/core/EventHandler'];
$scope.eventHandler = new EventHandler();
$scope.list = [{content: "famous"}, {content: "angular"}, {content: "rocks!"}];
$scope.options = {
scrollView: {
direction: 0 // displays the fa-views horizontally
}
};
}]);{% endraw %}
+ {% raw %}fa-app {
width: 320px;
height: 320px;
overflow: hidden;
}
p {
padding: 8px 8px;
}{% endraw %}
+ {% raw %}<fa-app ng-controller="ModifierCtrl">
<fa-modifier fa-opacity=".25" fa-skew="myScopeSkewVariable"
fa-translate="[25, 50, 2]"
fa-scale="myScopeFunctionThatReturnsAnArray">
<!-- Child elements of this fa-modifier will be affected by the values above -->
<fa-surface>I'm translucent, skewed, rotated, and translated</fa-surface>
</fa-modifier>
</fa-app>{% endraw %}
+ {% raw %}angular.module('faModifierExampleApp', ['famous.angular'])
.controller('ModifierCtrl', ['$scope', function($scope) {
$scope.myScopeSkewVariable = [0,0,.3];
$scope.myScopeFunctionThatReturnsAnArray = function() {
return [1.5, 1.5];
};
}]);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ Fa-modifier
properties, (such as faRotate
, faScale
, etc) can be bound to number/arrays, object properties defined on the scope, function references, or function expressions.
Some properties (faOpacity
, faSize
, faOrigin
, faAlign
) can be bound to a Transitionable object directly.
Fa-modifier
properties can be bound to number/array values.
<fa-modifier fa-origin="[.5,.5]" fa-size="[100, 100]" fa-rotate=".3">
- <fa-surface fa-background-color="'red'"></fa-surface>
- </fa-modifier>
++ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app>
<fa-modifier fa-origin="[.5,.5]" fa-size="[100, 100]" fa-rotate=".3">
<fa-surface fa-background-color="'red'"></fa-surface>
</fa-modifier>
</fa-app>{% endraw %}
+ {% raw %}angular.module('faModifierExampleApp', ['famous.angular']);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ Fa-modifier
properties can be bound to object properties defined on the scope.
<fa-modifier fa-origin="boxObject.origin" fa-size="boxObject.size">
- <fa-surface fa-background-color="'red'"></fa-surface>
- </fa-modifier>
-$scope.boxObject = {
- origin: [.4, .4],
- size: [50, 50]
-}
++ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +
{% raw %}<fa-app ng-controller="ModifierCtrl">
<!-- These properties are bound to properties of $scope.boxObject in the contorller -->
<fa-modifier fa-origin="boxObject.origin" fa-size="boxObject.size">
<fa-surface fa-background-color="'red'"></fa-surface>
</fa-modifier>
</fa-app>{% endraw %}
+ {% raw %}angular.module('faModifierExampleApp', ['famous.angular'])
.controller('ModifierCtrl', ['$scope', function($scope) {
$scope.boxObject = {
origin: [.4, .4],
size: [50, 50]
};
}]);{% endraw %}
+ {% raw %}fa-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}{% endraw %}
+ Fa-modifier
properties can be bound to a function reference that returns a value.
<fa-modifier fa-origin="genBoxOrigin">
diff --git a/docs/unstable/directive/ngBlur/index.md b/docs/unstable/directive/ngBlur/index.md
index 4d92cd51..1f4b2819 100644
--- a/docs/unstable/directive/ngBlur/index.md
+++ b/docs/unstable/directive/ngBlur/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
diff --git a/docs/unstable/directive/ngClick/index.md b/docs/unstable/directive/ngClick/index.md
index 524e87ff..aa4fa15e 100644
--- a/docs/unstable/directive/ngClick/index.md
+++ b/docs/unstable/directive/ngClick/index.md
@@ -40,6 +40,11 @@ this functionality will be lost.
+Dependencies
+
+
@@ -58,17 +63,68 @@ this functionality will be lost.
-Example
ng-click on an fa-surface
+Example
+
+{% assign lvl = page.url | append:'X' | split:'/' | size %}
+{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
+
+
+
+
+ Edit in Plunker
+
+
+
+
+ {% raw %}<fa-app ng-controller="ClickCtrl" id="app">
<fa-modifier fa-size="[300, 100]">
<fa-surface fa-background-color="'red'" ng-click="myClickHandler($event)">Click Me! This has been clicked {{clicked}} times.</fa-surface>
</fa-modifier>
</fa-app>{% endraw %}
+
+
+
+ {% raw %}#app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
fa-surface {
cursor: pointer;
}{% endraw %}
+
+
+
+ {% raw %}angular.module('faInputExampleApp', ['famous.angular'])
.controller('ClickCtrl', ['$scope', function($scope) {
$scope.clicked = 0;
$scope.myClickHandler = function($event) {
console.log($event);
$scope.clicked++;
};
}]);{% endraw %}
+
+
+
+
+
+
+
+
+
+ng-click on an fa-surface
ng-click
can be used on an fa-surface
. Internally, a Famous Surface has a .on()
method that binds a callback function to an event type handled by that Surface.
- The function expression bound to ng-click
is bound to that fa-surface
's click eventHandler, and when the fa-surface
is clicked, the function expression will be called.
-<fa-modifier fa-size="[100, 100]">
- <fa-surface ng-click="myClickHandler($event)" fa-background-color="'red'"></fa-surface>
-</fa-modifier>
-```javascript
-$scope.myClickHandler = function($event) {
- console.log("click");
- console.log($event);
-};
+ The function expression bound to ng-click
is bound to that fa-surface
's click eventHandler, and when the fa-surface
is clicked, the function expression will be called.
diff --git a/docs/unstable/directive/ngCopy/index.md b/docs/unstable/directive/ngCopy/index.md
index 833cd01f..84ac17b4 100644
--- a/docs/unstable/directive/ngCopy/index.md
+++ b/docs/unstable/directive/ngCopy/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,16 +93,16 @@ copy. (Event object is available as $ev
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/docs/unstable/directive/ngCut/index.md b/docs/unstable/directive/ngCut/index.md
index 97563cf7..2c55cdea 100644
--- a/docs/unstable/directive/ngCut/index.md
+++ b/docs/unstable/directive/ngCut/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,16 +93,16 @@ cut. (Event object is available as $eve
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/docs/unstable/directive/ngDblclick/index.md b/docs/unstable/directive/ngDblclick/index.md
index 64470a5e..f0e8d58c 100644
--- a/docs/unstable/directive/ngDblclick/index.md
+++ b/docs/unstable/directive/ngDblclick/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ a dblclick. (The Event object is available as $event
)
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/docs/unstable/directive/ngFocus/index.md b/docs/unstable/directive/ngFocus/index.md
index 7480e9e4..fb138963 100644
--- a/docs/unstable/directive/ngFocus/index.md
+++ b/docs/unstable/directive/ngFocus/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
diff --git a/docs/unstable/directive/ngKeydown/index.md b/docs/unstable/directive/ngKeydown/index.md
index 2c07b0f7..49f274a6 100644
--- a/docs/unstable/directive/ngKeydown/index.md
+++ b/docs/unstable/directive/ngKeydown/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ keydown. (Event object is available as $event
and can be interrogat
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ keydown. (Event object is available as $event
and can be interrogat
-
+
diff --git a/docs/unstable/directive/ngKeypress/index.md b/docs/unstable/directive/ngKeypress/index.md
index c97b5aad..e03419de 100644
--- a/docs/unstable/directive/ngKeypress/index.md
+++ b/docs/unstable/directive/ngKeypress/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -94,10 +94,10 @@ and can be interrogated for keyCode, altKey, etc.)
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/docs/unstable/directive/ngKeyup/index.md b/docs/unstable/directive/ngKeyup/index.md
index 987cef8c..281f95f5 100644
--- a/docs/unstable/directive/ngKeyup/index.md
+++ b/docs/unstable/directive/ngKeyup/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ keyup. (Event object is available as $event
and can be interrogated
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ keyup. (Event object is available as $event
and can be interrogated
-
+
diff --git a/docs/unstable/directive/ngMousedown/index.md b/docs/unstable/directive/ngMousedown/index.md
index 085ac5cd..4c7aed56 100644
--- a/docs/unstable/directive/ngMousedown/index.md
+++ b/docs/unstable/directive/ngMousedown/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ mousedown. (Event object is available as
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ mousedown. (Event object is available as
-
+
diff --git a/docs/unstable/directive/ngMouseenter/index.md b/docs/unstable/directive/ngMouseenter/index.md
index ceca71d0..dd02c116 100644
--- a/docs/unstable/directive/ngMouseenter/index.md
+++ b/docs/unstable/directive/ngMouseenter/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ mouseenter. (Event object is available as
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ mouseenter. (Event object is available as
-
+
diff --git a/docs/unstable/directive/ngMouseleave/index.md b/docs/unstable/directive/ngMouseleave/index.md
index 05065d5f..7881c2f0 100644
--- a/docs/unstable/directive/ngMouseleave/index.md
+++ b/docs/unstable/directive/ngMouseleave/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ mouseleave. (Event object is available as
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ mouseleave. (Event object is available as
-
+
diff --git a/docs/unstable/directive/ngMousemove/index.md b/docs/unstable/directive/ngMousemove/index.md
index 031bab32..63cd6fb9 100644
--- a/docs/unstable/directive/ngMousemove/index.md
+++ b/docs/unstable/directive/ngMousemove/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ mousemove. (Event object is available as
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ mousemove. (Event object is available as
-
+
diff --git a/docs/unstable/directive/ngMouseover/index.md b/docs/unstable/directive/ngMouseover/index.md
index 44440eee..7440facf 100644
--- a/docs/unstable/directive/ngMouseover/index.md
+++ b/docs/unstable/directive/ngMouseover/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ mouseover. (Event object is available as
-
+
Edit in Plunker
-
@@ -114,7 +114,7 @@ mouseover. (Event object is available as
-
+
diff --git a/docs/unstable/directive/ngMouseup/index.md b/docs/unstable/directive/ngMouseup/index.md
index e7f2fd2d..60259721 100644
--- a/docs/unstable/directive/ngMouseup/index.md
+++ b/docs/unstable/directive/ngMouseup/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,10 +93,10 @@ mouseup. (Event object is available as
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/docs/unstable/directive/ngPaste/index.md b/docs/unstable/directive/ngPaste/index.md
index 095458af..2f1b700b 100644
--- a/docs/unstable/directive/ngPaste/index.md
+++ b/docs/unstable/directive/ngPaste/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -93,16 +93,16 @@ paste. (Event object is available as $e
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/docs/unstable/directive/ngSubmit/index.md b/docs/unstable/directive/ngSubmit/index.md
index 5e0db603..d4480946 100644
--- a/docs/unstable/directive/ngSubmit/index.md
+++ b/docs/unstable/directive/ngSubmit/index.md
@@ -10,7 +10,7 @@ docType: "directive"
---
@@ -104,10 +104,10 @@ for a detailed discussion of when `ngSubmit` may be triggered.
{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %}
diff --git a/famous-angular-docs b/famous-angular-docs
index 7bae6d24..8d2d2da9 160000
--- a/famous-angular-docs
+++ b/famous-angular-docs
@@ -1 +1 @@
-Subproject commit 7bae6d24d42c01214b590c850e38fb218b74be2a
+Subproject commit 8d2d2da927eb8eb87952f3943eb99ee7c9b497f4
diff --git a/src/scripts/directives/fa-app.js b/src/scripts/directives/fa-app.js
index bfdafb38..28512cb4 100644
--- a/src/scripts/directives/fa-app.js
+++ b/src/scripts/directives/fa-app.js
@@ -21,33 +21,56 @@
*
* Declaring `fa-app` appends a div with the class of `"famous-angular-container"` to the DOM. It then instantiates a Context via Famous' Engine `.createContext()` method, passing in a reference to the `famous-angular-container` div, resulting in a Famous context that renderables can be added to connected to Angular. `Fa-app` can be declared as an element or as an attribute within another element.
*
- * ```html
- *
- *
- * This will be shown on screen.
- *
- * This will not appear on screen because it is not inside an fa-surface.
- *
- * ```
+
+
+
+
+ This will be shown on screen.
+
+ This will not appear on screen because it is not inside an fa-surface.
+
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
+ angular.module('faAppExampleApp', ['famous.angular']);
+
+
* ## Common Qustions
* ### Multiple fa-app's
* Nesting an `fa-app` within another `fa-app` is possible, and the use case of this approach would be for css content overflow.
*
- * In the example below, there is an `fa-surface` with an `fa-app` nested inside. Normally, an `fa-surface` should not nest another Famous element within it because it is a leaf node that has the purpose of being a container for html content. The exception is nesting an `fa-app` within an `fa-surface`, which creates another Famous context, in which Famous elements can be nested inside.
- *
- * ```html
- *
- *
- *
- *
- *
- *
- *
- *
- * ```
+ * In the example below, there is an `fa-surface` with an `fa-app` nested inside. Normally, an `fa-surface` should not nest another Famous element within it because it is a leaf node that has the purpose of being a container for html content. The exception is nesting an `fa-app` within an `fa-surface`, which creates another Famous context, in which Famous elements can be nested inside.
*
+
+
+
+
+
+
+
+
+
+ fa-app {
+ background-color: #000;
+ }
+
+
+ angular.module('faAppExampleAppA', ['famous.angular']);
+
+
* The outer `fa-app` is sized 500x500, and it contains all of the content. The use case of this `fa-app` within another `fa-app` is to clip content using the css overflow:hidden property. The `fa-image-surface` links to a 400x400 sized image of the Famous logo. Its parent is the nested `fa-app`, whose size is only 200x200.
*
* The larger image content (400x400) will overflow the boundaries of its parent, the the nested `fa-app` (200x200). Because `fa-app` has a css overflow:hidden property, it will clip the content of any of its children that is outside the 200x200 region. Any part of the 400x400 image that reaches outside of these boundaries are ignored. This may be useful for complex animations.
diff --git a/src/scripts/directives/fa-flipper.js b/src/scripts/directives/fa-flipper.js
index cf55ac1f..a4396c12 100644
--- a/src/scripts/directives/fa-flipper.js
+++ b/src/scripts/directives/fa-flipper.js
@@ -2,6 +2,7 @@
* @ngdoc directive
* @name faFlipper
* @module famous.angular
+ * @requires famous
* @restrict EA
* @description
* This directive will create a Famo.us Flipper containing the
@@ -21,17 +22,41 @@
*
* This function attempts a DOM lookup for an isolate of an `fa-flipper` element, and calls the `.flip()` function of `fa-flipper`.
*
- *```html
- *
- *
- *
- *
- *```
- *```javascript
- * $scope.flipIt = function() {
- * $famous.find('fa-flipper')[0].flip();
- * };
- *```
+
+
+
+
+
+ Click me to see me flip!
+
+
+ Flip me again!
+
+
+
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+ div {
+ cursor: pointer;
+ padding: 8px 8px;
+ }
+
+
+ angular.module('faFlipperExampleApp', ['famous.angular'])
+ .controller('FlipperCtrl', ['$scope', '$famous', function($scope, $famous) {
+ $scope.flipIt = function() {
+ $famous.find('fa-flipper')[0].flip();
+ };
+ }]);
+
+
*/
angular.module('famous.angular')
diff --git a/src/scripts/directives/fa-grid-layout.js b/src/scripts/directives/fa-grid-layout.js
index 2634e0cb..3ced494c 100644
--- a/src/scripts/directives/fa-grid-layout.js
+++ b/src/scripts/directives/fa-grid-layout.js
@@ -18,34 +18,74 @@
* @example
* A Famous Grid Layout divides a context into evenly-sized grid cells. Pass an option such as `dimension` by binding an object with the property to `fa-options`.
*
- * In the example below, `fa-options` references `myGridLayoutOptions` on the scope.
- *
- * ```javascript
- * $scope.myGridLayoutOptions = {
- * dimensions: [2,2], // specifies number of columns and rows
- * };
- * ```
- *
- * In the example below, `fa-size` is specified as `[100, 100]`, so each `fa-surface` will have these dimensions.
- * ```html
- *
- *
- *
- *
- *
- * ```
- * ```javascript
- * $scope.grids = [{bgColor: "orange"}, {bgColor: "red"}, {bgColor: "green"}, {bgColor: "yellow"}];
- * ```
+ * In the example below, `fa-options` references `myGridLayoutOptions` on the scope. The dimensions property has a value of `[2,2]` which specifies the columns and rows. `fa-size` is specified as `[100, 100]` on the fa-modifier, so each `fa-surface` will have these dimensions.
*
+
+
+
+
+
+
+
+
+
+
+
+ angular.module('faGridExampleApp', ['famous.angular'])
+ .controller('GridCtrl', ['$scope', function($scope) {
+
+ $scope.myGridLayoutOptions = {
+ dimensions: [2,2], // specifies number of columns and rows
+ };
+
+ $scope.grids = [{bgColor: "orange"}, {bgColor: "red"}, {bgColor: "green"}, {bgColor: "yellow"}];
+
+ }]);
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
+
* If `fa-size` is not specified, as in this example below, the fa-surface's will collectively fill the height and width of its parent modifier/context.
*
- * ```html
- *
- *
- *
- * ```
+
+
+
+
+
+
+
+
+
+ angular.module('faGridExampleAppA', ['famous.angular'])
+ .controller('GridCtrlA', ['$scope', function($scope) {
+
+ $scope.myGridLayoutOptions = {
+ dimensions: [2,2], // specifies number of columns and rows
+ };
+
+ $scope.grids = [{bgColor: "orange"}, {bgColor: "red"}, {bgColor: "green"}, {bgColor: "yellow"}];
+
+ }]);
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
*/
angular.module('famous.angular')
diff --git a/src/scripts/directives/fa-header-footer-layout.js b/src/scripts/directives/fa-header-footer-layout.js
index 86d2cd28..9fdefc0c 100644
--- a/src/scripts/directives/fa-header-footer-layout.js
+++ b/src/scripts/directives/fa-header-footer-layout.js
@@ -23,55 +23,111 @@
*
* Since the header and footer Modifiers have fixed heights of `[undefined, 75]` (fill the parent container horizontally, 75 pixels vertically), the content will fill the remaining height of the parent modifier or context.
*
- *```html
- *
- *
- * Header
- *
- *
- * Content
- *
- *
- * Footer
- *
- *```
+
+
+
+
+
+
+
+ Header
+
+
+ Content
+
+
+ Footer
+
+
+
+
+
+
+ angular.module('faHeaderFooterExampleApp', ['famous.angular'])
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
*
* Famo.us' `HeaderFooterLayout` defaults to a vertical orientation.
- * Specify a direction in the options to obtains a horizontal orientation.
+ * Specify a direction in the fa-options object to obtain a horizontal orientation.
*
- * ```html
- *
- *
- * Header
- *
- *
- * Content
- *
- *
- * Footer
- *
- * ```
- *
+
+
+
+
+
+
+
+ Header
+
+
+ Content
+
+
+ Footer
+
+
+
+
+
+
+ angular.module('faHeaderFooterExampleAppA', ['famous.angular'])
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
* ## ng-repeat inside a fa-header-footer
*
* `Fa-header-footer` works with ng-repeat'ed renderables:
*
- * ```html
- *
- *
- *
- * {{view.text}}
- *
- *
- *
- * ```
- * ```javascript
- * $scope.views = [
- * {bgColor: "red", text: "header", size: [undefined, 100]},
- * {bgColor: "green", text: "content", size: [undefined, undefined]},
- * {bgColor: "blue", text: "footer", size: [undefined, 100]}
- * ];
- * ```
+
+
+
+
+
+
+ {{view.text}}
+
+
+
+
+
+
+ angular.module('faHeaderFooterExampleAppB', ['famous.angular'])
+ .controller('HeaderFooterCtrlB', ['$scope', function($scope) {
+ $scope.views = [
+ {bgColor: "red", text: "header", size: [undefined, 100]},
+ {bgColor: "green", text: "content", size: [undefined, undefined]},
+ {bgColor: "blue", text: "footer", size: [undefined, 100]}
+ ];
+ }]);
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
+
* In the example above, 3 renderables are generated through an ng-repeat. The header and footer `Modifier`s generated by the ng-repeat have defined sizes of `[undefined, 100]` (they will fill their parent container horizontally, and be 100 pixels vertically). The content has a size of `[undefined, undefined]`, and it will fill the remaining heght and width of its container.
*
* Note:
diff --git a/src/scripts/directives/fa-image-surface.js b/src/scripts/directives/fa-image-surface.js
index 57a1a578..43c6f070 100644
--- a/src/scripts/directives/fa-image-surface.js
+++ b/src/scripts/directives/fa-image-surface.js
@@ -14,15 +14,32 @@
* ```
@example
* To use `fa-image-surface`, declare an `fa-image-url` attribute with a string url.
- * ```html
- *
- *
- * ```
+
+
+
+
+
+
+
+
+ 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.
diff --git a/src/scripts/directives/fa-index.js b/src/scripts/directives/fa-index.js
index 3175d891..23735824 100644
--- a/src/scripts/directives/fa-index.js
+++ b/src/scripts/directives/fa-index.js
@@ -31,43 +31,64 @@
* `Fa-start-index` will not affect the sequential order of the layout; the `fa-view` with the red background will be layed out first, followed by the one with the blue background.
* By setting `fa-start-index` to 1, the Scroll View will display the View with the index of 1, which is the View with the blue background color.
*
- * ```html
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * ```
- *
- * ```javascript
- * var EventHandler = $famous['famous/core/EventHandler'];
- * $scope.eventHandler = new EventHandler();
- * $scope.list = [{content: "famous"}, {content: "angular"}, {content: "rocks!"}];
- *
- * $scope.options = {
- * scrollView: {
- * direction: 0 // displays the fa-views horizontally
- * }
- * };
- *```
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Scroll me back!
+
+
+
+
+
+
+
+ Scroll me!
+
+
+
+
+
+
+
+
+ angular.module('faIndexExampleApp', ['famous.angular'])
+ .controller('IndexCtrl', ['$scope', '$famous', function($scope, $famous) {
+
+ var EventHandler = $famous['famous/core/EventHandler'];
+ $scope.eventHandler = new EventHandler();
+ $scope.list = [{content: "famous"}, {content: "angular"}, {content: "rocks!"}];
+
+ $scope.options = {
+ scrollView: {
+ direction: 0 // displays the fa-views horizontally
+ }
+ };
+
+ }]);
+
+
+ fa-app {
+ width: 320px;
+ height: 320px;
+ overflow: hidden;
+ }
+ p {
+ padding: 8px 8px;
+ }
+
+
*/
angular.module('famous.angular')
diff --git a/src/scripts/directives/fa-input.js b/src/scripts/directives/fa-input.js
index b56a7ea9..64d9358e 100644
--- a/src/scripts/directives/fa-input.js
+++ b/src/scripts/directives/fa-input.js
@@ -4,6 +4,7 @@
* @name ngClick
* @module famous.angular
* @restrict A
+ * @requires famous.angular
*
* @description
* This is a wrapped for tha default ngCick which allows you to specify custom behavior when an fa-surface is clicked.
@@ -20,21 +21,40 @@
*
* ```
* @example
+
+
+
+
+ Click Me! This has been clicked {{clicked}} times.
+
+
+
+
+ #app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+ fa-surface {
+ cursor: pointer;
+ }
+
+
+ angular.module('faInputExampleApp', ['famous.angular'])
+ .controller('ClickCtrl', ['$scope', function($scope) {
+ $scope.clicked = 0;
+ $scope.myClickHandler = function($event) {
+ console.log($event);
+ $scope.clicked++;
+ };
+ }]);
+
+
* ### ng-click on an fa-surface
* `ng-click` can be used on an `fa-surface`. Internally, a Famous Surface has a `.on()` method that binds a callback function to an event type handled by that Surface.
* The function expression bound to `ng-click` is bound to that `fa-surface`'s click eventHandler, and when the `fa-surface` is clicked, the function expression will be called.
- *
- * ```html
- *
- *
- *
- * ```
- * ```javascript
- * $scope.myClickHandler = function($event) {
- * console.log("click");
- * console.log($event);
- * };
- *
**/
angular.module('famous.angular')
.config(['$provide', function ($provide) {
diff --git a/src/scripts/directives/fa-modifier.js b/src/scripts/directives/fa-modifier.js
index 86b70c21..cc90428b 100644
--- a/src/scripts/directives/fa-modifier.js
+++ b/src/scripts/directives/fa-modifier.js
@@ -21,43 +21,101 @@
* This directive creates a Famo.us Modifier that will affect all children render nodes. Its properties can be bound
* to values (e.g. `fa-translate="[15, 20, 1]"`, Famo.us Transitionable objects, or to functions that return numbers.
* @usage
- * ```html
- *
- *
- * I'm translucent, skewed, rotated, and translated
- *
- * ```
- *```javascript
- * $scope.myScopeSkewVariable = [0,0,.3];
- * $scope.myScopeFunctionThatReturnsAnArray = function() {
- * return [0.5, 0.5];
- * };
- *```
+ *
+
+
+
+
+
+ I'm translucent, skewed, rotated, and translated
+
+
+
+
+ angular.module('faModifierExampleApp', ['famous.angular'])
+ .controller('ModifierCtrl', ['$scope', function($scope) {
+
+ $scope.myScopeSkewVariable = [0,0,.3];
+
+ $scope.myScopeFunctionThatReturnsAnArray = function() {
+ return [1.5, 1.5];
+ };
+ }]);
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
+ *
* @example
* ## Values that fa-modifier attributes accept
* `Fa-modifier` properties, (such as `faRotate`, `faScale`, etc) can be bound to number/arrays, object properties defined on the scope, function references, or function expressions.
* Some properties (`faOpacity`, `faSize`, `faOrigin`, `faAlign`) can be bound to a Transitionable object directly.
*
- * ### Number/Array values
- * `Fa-modifier` properties can be bound to number/array values.
- * ```html
- *
- *
- *
- * ```
+
+
+
+
+
+
+
+
+
+ angular.module('faModifierExampleApp', ['famous.angular']);
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
+ *
* ### Object properties on the scope
*`Fa-modifier` properties can be bound to object properties defined on the scope.
- * ```html
- *
- *
- *
- * ```
- * ```javascript
- * $scope.boxObject = {
- * origin: [.4, .4],
- * size: [50, 50]
- * }
- * ```
+ *
+
+
+
+
+
+
+
+
+
+
+ angular.module('faModifierExampleApp', ['famous.angular'])
+ .controller('ModifierCtrl', ['$scope', function($scope) {
+
+ $scope.boxObject = {
+ origin: [.4, .4],
+ size: [50, 50]
+ };
+
+ }]);
+
+
+ fa-app {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+
+ *
* ### Function references
* `Fa-modifier` properties can be bound to a function reference that returns a value.
*