-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19860 from mixonic/mixonic/update-blueprints
- Loading branch information
Showing
6 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
export default Route.extend({ | ||
export default Route.extend({<% if (hasDynamicSegment) {%> | ||
model(params) { | ||
/** | ||
* This route was generated with a dynamic segment. Implement data loading | ||
* based on that dynamic segment here in the model hook. | ||
*/ | ||
return params; | ||
},<%}%> | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
export default class <%= classifiedModuleName %>Route extends Route { | ||
export default class <%= classifiedModuleName %>Route extends Route {<% if (hasDynamicSegment) {%> | ||
model(params) { | ||
/** | ||
* This route was generated with a dynamic segment. Implement data loading | ||
* based on that dynamic segment here in the model hook. | ||
*/ | ||
return params; | ||
}<%}%> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
node-tests/fixtures/route/native-route-with-dynamic-segment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
export default class FooRoute extends Route { | ||
model(params) { | ||
/** | ||
* This route was generated with a dynamic segment. Implement data loading | ||
* based on that dynamic segment here in the model hook. | ||
*/ | ||
return params; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
export default Route.extend({ | ||
model(params) { | ||
/** | ||
* This route was generated with a dynamic segment. Implement data loading | ||
* based on that dynamic segment here in the model hook. | ||
*/ | ||
return params; | ||
}, | ||
}); |