LoginSignup
2
2

More than 5 years have passed since last update.

synthのチュートリアルやった

Last updated at Posted at 2014-09-06

ここのチュートリアルを終えるまでにつまったところを書いてく。
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

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2