Skip to content

Instantly share code, notes, and snippets.

View gusano's full-sized avatar
👾
React.js, Remix.run, frontend

Yvan Volochine gusano

👾
React.js, Remix.run, frontend
View GitHub Profile
@KonradIT
KonradIT / readme.md
Last active July 11, 2024 20:46
GoPro Studio for Linux

Controller needs explained

Since the v2 router came it became clear that using global singleton controllers like App.userController = App.UserController.create() is not the way to go. This prevents us from doing a simple binding like

App.UserController = Ember.Controller.extend({
  accountsBinding: "App.accountsController.content"
})

Recently, we've been working on extracting Ember conventions from applications we're working on into the framework. Our goal is to make it clearer how the parts of an Ember application work together, and how to organize and bootstrap your objects.

Routing

Routing is an important part of web applications. It allows your users to share the URL they see in their browser, and have the same things appear when their friends click on the link.

The Ember.js ecosystem has several great solutions for routing. But, since it is such an important part of most web applications, we've decided to build it right into the framework.

If you have already modeled your application state using Ember.StateManager, there are a few changes you'll need to make to enable routing. Once you've made those changes, you'll notice the browser's address bar spring to life as you start using your app—just by moving between states, Ember.js will update the URL automatically.