Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 Ember 中获取现有路线的列表?就像 Rails 中“rake routes”命令的方式。
App.Router.router.recognizer.names您可以使用或仅希望使用路线名称来访问所有现有路线Ember.keys(App.Router.router.recognizer.names)
App.Router.router.recognizer.names
Ember.keys(App.Router.router.recognizer.names)
尽管不建议将其用于生产,但仅用于调试目的。
这里有一个例子,请检查控制台。
希望能帮助到你。