(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# This class facilitates writting Angular Controllers as OOP style classes rather than | |
# declaring an expensive method everytime the constructor is ran | |
# It MUST be extended by any Controller written as a class. | |
# That class MUST implement a constructor and call it's super | |
# NOTE: I have second doubts about this because | |
# 1) it doesn't do things the angular way, | |
# 2) it's coffeescript specific more or less | |
# 3) it requires specific code to be written in the implementing classes |
class Api::PeopleController < ApplicationController | |
def index | |
@people = Person.all | |
render json: @people.map { |p| | |
{ | |
full_name: "#{p.fname} #{p.lname}", | |
id: p.id | |
} | |
} |
-> index.html(.erb) | |
<div ng-controller="TasksController"> | |
<div ng-repeat="task in tasks" style="border:1px solid black; margin: 2px 2px 2px 2px; padding: 2px 2px 2px 2px;"> | |
{{task.name}} | |
<button ng-click="open()">Edit</button> | |
<modal/> | |
</div> | |
</div> | |
### | |
runtime in index.html <script> tag | |
angular.element(document).ready(function() { | |
angular.module('Movies', []); | |
angular.module('Movies').controller('MosaicController', | |
function ($scope, $http) { | |
$scope.teststuff = "hello" |
calendar.jade | |
div(ng-include='\'partials/navbar.html\'') | |
.jumbotron | |
h1 | |
| Calendar | |
p.lead | |
br |
<!-- Proper Rails + AngularJS syntax --> | |
<%= f.text_field :title, :class=> "form-control", | |
"ng-model" => "title", "ng-change" => "changeTitle(title)" %> |
<!-- this will cause a rails error --> | |
<%= f.text_field :title, :class=> "form-control", | |
:ng-model => "title", :ng-change => "changeTitle(title)" %> |
class Example extends Backbone.View | |
template: () -> | |
# render the template here and return | |
# a text object containing the template text | |
initialize: () -> | |
@render() | |