- source
- Vueはvue.jsのコアとなるコンストラクタ
- インスタンスが作られたときにデータバインディングが開始される
- オプションを取ることも出来て、DOMやデータやメソッドについて定義出来る
# Original Rails controller and action | |
class EmployeesController < ApplicationController | |
def create | |
@employee = Employee.new(employee_params) | |
if @employee.save | |
redirect_to @employee, notice: "Employee #{@employee.name} created" | |
else | |
render :new | |
end |
2013 Minori Yamashita ympby@gmail.com
-- ここにあなたの名前を追記 --
サイズがあまりに大きくなってしまったので、gist ではなくて github 上で管理するようにしました。
https://github.com/Shinpeim/process-book
URL 変わっちゃうの申し訳ないんだけど、一覧性が高くなるのと pull req が受け取れるメリットのほうを取ります。せっかく読みにきてくれたのにひと手間かかっちゃってすみません。
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |