So the objective is to make some buttons the size of 20% of the width & height of the screen. In regular Famo.us, this works:
var ww = window.innerWidth * .2;
var hh = window.innerHeight * .2;
// later in the code
for(var i = 0; i < 2; i++) {
surfaces.push(new Surface({
content: "button",
size: [ww, hh]
}));
However, in Angular when I use fa-size in the HTML, it's not calculating my objects:
<fa-modifier ng-repeat="item in list"
fa-size="[ww, hh]"
fa-origin="[0.5, 0.5]"
fa-align="[0.5, 0.5]">
<fa-surface fa-background-color="item.bgColor">
{{item.content}}
</fa-surface>
</fa-modifier>
In the Angular Controller I have:
angular.module('famousAngularStarter')
.controller('MainCtrl', function ($scope, $famous) {
var Transitionable = $famous['famous/transitions/Transitionable'];
var Easing = $famous['famous/transitions/Easing'];
var ww = window.innerWidth;
var hh = window.innerHeight;
$scope.myGridLayoutOptions = {
dimensions: [2, 3]
};
});