Ember - Controllers are Singletons

Controllers in Ember are singletons. When the user leaves a page and goes to another one, the controller is not torn down. It lives on, keeping its properties. This makes sense for a framework that aims to create long-lived, rich client-side applications, but it’s something to watch out for when developing Ember applications.

October 1, 2016 · 2 min · 364 words · Bá Tới