문서에서 설명하는 부분을 볼 수 없습니다.Ember에서 전역으로 기본 속성을 설정하는 방법은 무엇입니까?
this.notifications.setDefaultClearNotification(value);
입니다.
전 세계적으로 속성을 설정하는 방법에 대해 올바른 방향을 알려줄 수 있습니까?
http://stonecircle.github.io/ember-cli-notifications/
문서에서 설명하는 부분을 볼 수 없습니다.Ember에서 전역으로 기본 속성을 설정하는 방법은 무엇입니까?
this.notifications.setDefaultClearNotification(value);
입니다.
전 세계적으로 속성을 설정하는 방법에 대해 올바른 방향을 알려줄 수 있습니까?
http://stonecircle.github.io/ember-cli-notifications/
setupController
후크로 application.js
경로 내에서 설정할 수있었습니다. I가 분명하지 않다 무엇
export default Ember.Route.extend({
setupController(){
this.notifications.setDefaultAutoClear(true);
this.notifications.setDefaultClearNotification(1200);
}
});
는 처음 호출 할 경로/컴포넌트/컨트롤러/서비스 또한
setDefaultAutoClear(true)
요구의 내부 후크의 내부에 갈 필요가 있다고했다. 기본값을 사용하려는 경우 문서를 사용한다는 의미가 아니라 문서에없는 것입니다.
이 플러그인은 everything에 주입되는 service을 사용
['controller', 'component', 'route', 'router', 'service'].forEach(injectionTarget => {
application.inject(injectionTarget, 'notifications', 'notification-messages:service');
});
그래서 this.notifications
그냥 항상 같은 싱글이다.