Skip to content

Commit

Permalink
modified: Gemfile
Browse files Browse the repository at this point in the history
modified:   Gemfile.lock
new file:   app/assets/javascripts/angular/controllers/.gitkeep
new file:   app/assets/javascripts/angular/controllers/homes.coffee
new file:   app/assets/javascripts/angular/filters/.gitkeep
new file:   app/assets/javascripts/angular/services/.gitkeep
new file:   app/assets/javascripts/angular/widgets/.gitkeep
modified:   app/assets/javascripts/application.js
new file:   app/assets/templates/.gitkeep
new file:   spec/javascripts/angular/.gitkeep
new file:   spec/javascripts/angular/controllersSpec.js
	-- added support for angular rails

modified:   app/assets/stylesheets/base.scss
	--  fixed style sheet error

modified:   app/views/layouts/application.html.erb
	-- basic angular testing
  • Loading branch information
atruskie committed Nov 5, 2012
1 parent 4f5dc61 commit 87ef799
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 7 deletions.
Empty file.
1 change: 1 addition & 0 deletions app/assets/javascripts/angular/controllers/homes.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class @HomesController
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require angular.min
//= require angle-up
//= require_tree ./angular
10 changes: 5 additions & 5 deletions app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// https://kuler.adobe.com/#themeID/1080677
// http://colorschemedesigner.com/
$master-background = #E9E7C2;
$master-highlight = #787C39;
$master-highlight-2 = #908221;
$master-dark = #2C2C2A;
$master-dark-2 = #584B28;
$master-background: #E9E7C2;
$master-highlight: #787C39;
$master-highlight-2: #908221;
$master-dark: #2C2C2A;
$master-dark-2: #584B28;
Empty file added app/assets/templates/.gitkeep
Empty file.
46 changes: 44 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
<!DOCTYPE html>
<html>
<html ng-app>
<head>
<title>QubarSite</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>

<script type="text/javascript">
function PhoneListCtrl($scope, $http) {

$http.get('users.json').success(function(data){
$scope.users = data;
});

$scope.orderProp = 'age';

$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S."},
{"name": "Motorola XOOM™ with Wi-Fi",
"snippet": "The Next, Next Generation tablet."},
{"name": "MOTOROLA XOOM™",
"snippet": "The Next, Next Generation tablet."}
];

$scope.hello = "hello world";
}
</script>

</head>
<body>

<%= yield %>
<!--<%= yield %>-->

<div ng-controller="PhoneListCtrl">
<h1>{{hello}} bitches!</h1>

<ul>
<li ng-repeat="user in users">
{{user.display_name}}
<p ng-bind="user.created_at"></p>
<p>{{user.updated_at}}</p>
</li>
</ul>

<p>Total number of phones: {{phones.length}}</p>

<table>
<tr><th>row number</th></tr>
<tr ng-repeat="i in [0, 1, 2, 3, 4, 5, 6, 7]"><td>{{i+1}}</td></tr>
</table>
</div>

</body>
</html>

0 comments on commit 87ef799

Please sign in to comment.