Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
ember-infinite-scroller
Advanced tools
Ember Infinite Scroller is a component that sits at the bottom of a page of content. It calls `store.find` to get more content and pushes the content into a model when a user scrolls to the bottom.
Ember Infinite Scroller is a component that sits at the bottom of a page of content. It calls
store.find
to get more content and pushes the content into a model when a user scrolls to
the bottom.
npm install ember-infinite-scroller --save-dev
ember g infinite-scroller
Drop the infinite scroller component into any template. There is one required param: contextController
.
In most cases it will be this
.
{{infinite-scroller contextController=this}}
Other parameters are optional.
limit
default: 12{{infinite-scroller contextController=this limit=30}}
beginInfinite
default: true
Use beginInfinite
to start or stop manually. For example:
Template:
<button {{action 'toggleBeginInfinite'}}>Begin</button>
{{infinite-scroller contextController=this beginInfinite=beginInfinite}}
Controller:
actions: {
toggleBeginInfinite: function() {
this.toggleProperty('beginInfinite')
}
}
content
default: the content of the contextControllerThe content
can be customized if the content of the infinite scroller is not the model
of the controller.
{{infinite-scroller contextController=this content=otherModel}}
modelName
default: the name of the model of the contentIf the infinite scroller should query a different model than the content of the content, it can be overwritten.
For example, if the content model type is 'note'
but the query should be for 'comment'
:
{{infinite-scroller contextController=this modelName='comment'}}
query
default:{model: this.get('modelName'), params: {}, callback: null}
The query
has a required modelName
and params
and an optional callback
.
{{infinite-scroller contextController=this query=query}}
Controller:
query: function() {
var query = {
model: 'post',
params: {published: true},
callback: function(posts) {
// do cool things with posts when they come back.
}
};
return query;
}
The blueprint template comes with some handy features, including a yield
that is
displayed when the infinite scroller is out of content.
{{infinite-scroller contextController=this}}
<span>No more content!</span>
{{/infinite-scroller}}
It also includes a loading spnner When the scroller is fetching content, it displays a spinner. The default is an image, but you can customize the css to change the spinner.
FAQs
Ember Infinite Scroller is a component that sits at the bottom of a page of content. It calls `store.find` to get more content and pushes the content into a model when a user scrolls to the bottom.
We found that ember-infinite-scroller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.