Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] added href with query param value from a CP #22

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/dummy/app/controllers/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ export default Em.Controller.extend({
queryParams: ['section'],
section: 'one',
dynamic: 'hello',
dynamicLength: Em.computed('dynamic', function() {
return this.get('dynamic.length');
}),
someObject: Em.computed(function() {
return Em.Object.create({
id: 'abc123'
});
}),
count: 0,
actions: {
increment: function() {
Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/app/templates/about.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
[<a href="{{href-to 'about' (query-params section='one')}}" class="js__href-to">One</a>]
[<a href="{{href-to 'about' (query-params section='two')}}" class="js__href-to">Two</a>]
[<a href="{{href-to 'about' (query-params section=dynamic)}}" class="js__href-to">Three</a>]
[<a href="{{href-to 'about' (query-params section=dynamicLength)}}" class="js__href-to">Four</a>]
[<a href="{{href-to 'about' (query-params section=someObject.id)}}" class="js__href-to">Five</a>]

dynamic QP value for Three link: {{input value=dynamic}}
</div>
Expand Down