Last active
August 29, 2015 14:01
-
-
Save hkusu/3fd98e65532e630af24f to your computer and use it in GitHub Desktop.
AngularJS と Famo.usを連携して Hello Warld を表示するまで ref: http://qiita.com/hkusu/items/9094c946e8914607a9be
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="stylesheet" href="bower_components/famous-angular/dist/famous-angular.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="bower_components/requirejs/require.js"></script> | |
| <script> | |
| require.config({baseUrl: 'bower_components'}); | |
| </script> | |
| <script src="bower_components/famous-angular/dist/famous-angular.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| angular.module('famousAngularTest2App', [ | |
| 'ngCookies', | |
| 'ngResource', | |
| 'ngSanitize', | |
| 'ngRoute', | |
| 'famous.angular' | |
| ]) | |
| .config(['$routeProvider', function ($routeProvider) { | |
| $routeProvider | |
| .when('/', { | |
| templateUrl: 'views/main.html', | |
| controller: 'MainCtrl' | |
| }) | |
| .otherwise({ | |
| redirectTo: '/' | |
| }); | |
| }]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .full-screen { | |
| position: fixed; | |
| bottom: 0; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <fa-app ng-controller="MainCtrl" class="full-screen"> | |
| <fa-modifier | |
| fa-translate="[30, 30, 0]"> | |
| <fa-surface | |
| fa-size="[100, 100]" | |
| fa-background-color="'rgba(111, 222, 333, 1)'"> | |
| {{hoge}} | |
| </fa-surface> | |
| </fa-modifier> | |
| </fa-app> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| angular.module('famousAngularTest2App') | |
| .controller('MainCtrl', ['$scope', '$famous', function ($scope, $famous) { | |
| $scope.hoge = 'Hello!!'; | |
| // 何やってるか不明。今回だとこれ書かなくても動く | |
| var EventHandler = $famous['famous/core/EventHandler']; | |
| $scope.eventHandler = new EventHandler(); | |
| }]) | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment