Closed zhouyaoji closed 10 years ago
Let's clarify about the url
addon offline.
/ping @caridy @zhouyaoji
Hey guys,
I've updated the wiki to include the additional app.map()
that are required if app.js
is registering routes outside of routes.json
.
Remember that routes.json
is sugar for now to actual app.get()
and app.map()
api calls. If needed, the application (preferably) can even provide their own wrapper around these calls for more complex configuration.
This is also mentioned in the HISTORY.md.
@imalberto that doesn't clarify on the url addon, is that still supported? if yes, how? It seems like it fails for @zhouyaoji
@caridy
The url
add-on is still supported, and is used by both mojito-shaker
and mojito-debug
extensions. The url
add-on relies on the routes being properly registered. I think looking at the examples, the routes are not registered via routes.json
but in app.js
. The matching app.map()
calls should setup the right mapping for the url
add-on to work.
@imalberto @caridy Great, I was able to use the Url addon after registering the routes with app.get
. I'll update the documentation and add the generating_urls
example/test again.
@imalberto @caridy I added and an updated generating_urls
example/documentation, the tests, updated the file mojito_routing.rst
to include how to make URLs w/ the Url addon and registering routes w/ app.map
. See the last commit: 154edc2d84b39eb7500298d2539c075ea0f80a11
The steps in the example now use
app.js
for routing and sections regarding routing have been updated to discuss how to define routing paths inapp.js
. In addition, the binding example was updated so that it doesn't use the Url addon, which requiresroutes.json
, and the generating_urls example was deleted as was its test.