ここのチュートリアルを終えるまでにつまったところを書いてく。
http://www.synthjs.com/tutorial/
angular is not defined
$ synth install -b
$ synth install -f
で依存モジュールをインストールしたはずなのに、localhost:3000
に接続したらangular is not defined
と言われてしまった。
解決策
bower_components のディレクトリ置き場所が違うことによるものだった。
Note:
Back-end packages will be installed into my_app/back/node_modules.
Front-end packages will be installed into my_app/front/bower_components.
コマンド叩いたときは何故かmy_app/front/app/bower_components
に生成されていたので起こられていたみたい。
tweets じゃないアプリにしたい
チュートリアルでは tweet アプリが提供されていたけど、他のアプリも作ろうと思ってソースコードとファイル名を片っ端から tweets を hoges に変えていった。でも hogesController が undefined のエラーが出てしまう…。
Error: [ng:areq] Argument 'hogesController' is not a function, got undefined
解決策
front/js/jsFiles に読み込んでるファイル一覧みたいなのがあった。これの controllers/tweets.js を hoges.js に変えたらうまくいきました。
ちなみに .coffee で書きたいときはソースコードの拡張子と jsFiles のファイル名を変えるだけでいいらしい!
http://qiita.com/dll7/items/1237539efdc650f8ea5e