You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/v3.4.0/controllers/index.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ The model is passed from the Route to the Controller by default using the [`setu
6
6
7
7
A Controller is usually paired with an individual Route of the same name.
8
8
9
+
[Routing Query Parameters](https://guides.emberjs.com/release/routing/query-params/) should be defined within a controller.
10
+
9
11
### Defining a Controller
10
12
11
13
We only need to generate a Controller file if we want to customize the properties or provide any actions to the Route. If we have no customizations, Ember will provide a default Controller instance for us at run time.
@@ -95,11 +97,11 @@ We can see that if the property `isExpanded` is toggled to true, we will show th
95
97
### Common questions
96
98
97
99
###### Should we use controllers in my application? I've heard they're going away!
98
-
100
+
99
101
Yes! Controllers are still an integral part of an Ember application architecture, and generated by the framework even if you don't declare a Controller module explicitly.
100
102
101
103
###### When should we create a Controller?
102
104
103
105
* We want to pass down actions or variables to share with a Route’s child components
104
106
* We have a computed property that depends on the results of the model hook
0 commit comments