Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
slndr-elements
Advanced tools
Readme
A small collection of minimalistic/slender angular pipes, directives and services
The library is published as a package of NPMJS weirdwizard account
npm install slndr-elements
If your app is not already using the packages listed below as peer dependencies please install them to your application.
Besides, the default angular dependencies this module requires following packages as peer dependencies:
Converts a markdown link e.g. [I'm an inline-style link with title](https://www.google.com "Google's Homepage")
into real a href link. It can be used to "allow" links in plain text input elements like html textareas.
<div>{{result?.value|markdownLink}}</div>
or if you want to open in it place (instead of new popup)
<div>{{result?.value|markdownLink,true}}</div>
If the value is null/undefined display an alternative text
<div>{{result?.value|ifNil:'--'}}</div>
If an empty string or empty collection should also show the alternative text then add true
as last parameter
<div>{{result?.value|ifNil:'--':true}}</div>
If the value is not null/undefined/empty than wrap it with a prefix or postfix something
<div>{{result?.value|wrapIfNotEmpty:'[',']' }}</div>
Above would should e.g. [yourtext] if result?.value is not empty. If the value is null/undefined or empty nothing would be shown.
If also an empty value should be wrapped, add a last parameter with false
. There is still no wrapping for null/undefined of course.
<div>{{result?.value|wrapIfNotEmpty:'[',']':false }}</div>
Above would should e.g. [yourtext] if not null and nothing if null
This directive can be used to add the functionality to disabling form controls when working with reactive forms in angular.
With the default [disable] tag, you get the message: It looks like you’re using the disabled attribute with a reactive form directive.
If you set disabled to true in the control in your component class, the disabled attribute will actually be set in the DOM for you. We recommend using this approach to avoid ‘changed after checked’ errors.
This can be used if you don't want to disable/enable the control in code like formControl.disable() or formControl.enable() or new FormControl({value: '', disabled: true})
<input matInput formControlName="coolName" [disableControl]="isDisabled">
This is the same as disableControl directive but this does not work with material controls (TODO: talk to developer if that was the real reason)
<input matInput formControlName="coolName" [disableComponent]="isDisabled">
A service to access the browsers window.location object. It is very handy if you want to write unit tests. The interface is like https://developer.mozilla.org/en-US/docs/Web/API/Location
FAQs
Unknown package
The npm package slndr-elements receives a total of 0 weekly downloads. As such, slndr-elements popularity was classified as not popular.
We found that slndr-elements 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.