ember-script icon indicating copy to clipboard operation
ember-script copied to clipboard

Won't compile nested router (works in Coffeescript)

Open neverfox opened this issue 10 years ago • 4 comments

  App*.Router.map ->
    @resource "advisors", path: "/"
    @resource "advisor",
      path: "/advisor/:advisor_id", ->
        @resource "advisor.accounts",
          path: "/accounts", ->
            @route "new"
        @resource "advisor.profile",
          path: "/profile", ->
            @route "update"
        @resource "advisor.tickets",
          path: "/tickets", ->
            @route "new"
 Error: Syntax error on line 8, column 36: unexpected '-' (\u002D)
05 :   App.Router.map ->
06 :     @resource "advisors", path: "/"
07 :     @resource "advisor",
08 :       path: "/advisor/:advisor_id", ->
^^ :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
09 :         @resource "advisor.accounts",
10 :           path: "/accounts", ->
11 :             @route "new"

neverfox avatar Apr 26 '14 06:04 neverfox

I think ember-script makes most sense for models and controllers. Beyond that it is (mostly) better to use coffeescript or livescript IMO.

kristianmandrup avatar Aug 30 '14 11:08 kristianmandrup

Fair enough, but it should at least not choke on what is essentially CoffeeScript, yeah?

neverfox avatar Aug 30 '14 19:08 neverfox

Yeah, I agree. Looks like it is too unstable at the moment and not being actively maintained much lately (summertime...?). Perhaps it will be better closer to Xmas. The idea is very promising for sure :) Very clean syntax!

kristianmandrup avatar Aug 30 '14 19:08 kristianmandrup

That would be nice. For those reasons, I'm not using it at all at the moment.

neverfox avatar Aug 30 '14 20:08 neverfox