Ember.js 如何从观察者内部更改URL/路由

Ember.js 如何从观察者内部更改URL/路由,ember.js,Ember.js,当控制器中的观察者触发某个事件时,如何强制应用程序更改URL/路由?您可以使用: 您使用: 您使用: 您使用: 你的代码在哪里,你已经尝试了什么?你的代码在哪里,你已经尝试了什么?你的代码在哪里,你已经尝试了什么?你的代码在哪里,你已经尝试了什么? // controllers/item.js export default Ember.Controller.extend({ myObserver: function() { if(this.get('somePro

当控制器中的观察者触发某个事件时,如何强制应用程序更改URL/路由?

您可以使用:

您使用:

您使用:

您使用:


你的代码在哪里,你已经尝试了什么?你的代码在哪里,你已经尝试了什么?你的代码在哪里,你已经尝试了什么?你的代码在哪里,你已经尝试了什么?
// controllers/item.js

export default Ember.Controller.extend({
     myObserver: function() {
          if(this.get('someProperty')) {
               this.transitionToRoute('someOtherRoute');
          }
     }.observes('someProperty')
});