문제

Please correct me if I'm wrong. The function of components in ember seems to be quite simple.

In many frameworks a "component" is probably something like a small application that manages its own status and provides a small set of APIs. Since ember uses Route to manage states of a webapp, do ember components have their own "routes" to organize its states, or do I have to implement my own solution like, a state machine?

도움이 되었습니까?

해결책

Components in Ember.js are supposed to be as closely to the Web Components specification (http://w3c.github.io/webcomponents/spec/custom) as possible. If you want to handle some internal state for your component you have to implement it on your own.

Nevertheless there is no need to implement state machine on your own. Look at this https://github.com/emberjs/ember-states

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top