1
有史以來最沒問題的問題。 這裏是我的代碼: App.coffee:AngularJS路由問題
window.app = angular.module "my_super_app", [
'router'
'ng-rails-csrf'
]
router.coffee:
angular.module "router", ['ngRoute']
.config ($routeProvider) ->
$routeProvider
.when '/', {
controller: "MainCtrl"
}
.controller 'MainCtrl',() ->
console.log "test"
Whyyyyyy它不工作?哭泣,把我的頭撞在桌子上... P.S.我故意將控制器添加到路由器中。