
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
gm.waits-for
Advanced tools
AngularJS module that displays a message in place of an element while a value it depends on loads asynchronously.
AngularJS directive that automatically shows a message or template while a value is loaded asynchronously.
I found I was always making a second element with the inverse ngIf
statement from an element where I show data that would just say 'Loading...'.
The waitsFor directive takes care of this automatically, optionally putting in a custom message or template.
Say you have some data you're loading asynchronously. You can use the waitsFor
directive to show the element that uses the data only when it's ready and give the user feedback while it's loading:
<div waits-for='items'>
<div ng-repeat='item in items'>
...
</div>
</div>
The directive is similar to ngShow
in that it hides the inner HTML of the element until the property is truthy using the 'ng-hide' CSS class. Because of this, the contents have to be inside elements to be hidden. Text nodes will be unaffected.
By default, it will just show <span>Loading...</span>
. You can also provide your own default template using waitsForConfigProvider
.
You can also add an attribute waits-for-template
to show a non-default template, or waits-for-template-url
to load a non-default template from a file or from $templateCache
. A template from a URL takes precedence over a string template.
The watcher that checks the value passed in to the waitsFor
attribute is automatically cancelled after the value resolves to a truthy value. To keep the watcher active, set the waitsForPersist
attribute to a truthy value.
Run npm start
and navigate to the 'example' directory to view examples showing different ways to use gm.waitsFor
.
Thanks to @tobiasahlin for spinner.
FAQs
AngularJS module that displays a message in place of an element while a value it depends on loads asynchronously.
The npm package gm.waits-for receives a total of 0 weekly downloads. As such, gm.waits-for popularity was classified as not popular.
We found that gm.waits-for 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.