-
Notifications
You must be signed in to change notification settings - Fork 11
adds limit param to set number of results #1
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -253,6 +253,10 @@ angular.module('cbBigBoardCtlr').controller('cbBigBoardCtrl', ['$scope', | |
| if ($scope.hideLandingPages && landingPagesCount[host]) { | ||
| limits[host] += landingPagesCount[host]; | ||
| } | ||
| //Force limit from param | ||
| if (!isNaN(configService.limit)) { | ||
| limits[host] = configService.limit; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you try this out? I dont think all params are added to the configService. Alternatively you could do if ($routeParams.limit) { There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, alternatively you could extend DEFAULT_LIMIT to $routeParams.limit |
||
| } | ||
| }); | ||
| firstSort = true; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you trying to check if 'limit' is defined on the configService object? This seems to specifically just check that configService.limit is not the value NaN. You'd probably want to do just a generic truthy check, since i imagine the limit should never be set to 0 legitimately? Could also just check that typeof limit is 'number'.