
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ngx-nullable
Advanced tools
This library provides a way to make properties nullable in Angular templates.
This library provides a way to make properties nullable in Angular templates.
✓ Angular 21 compatible
Here's the demo
yarn add ngx-nullable
provideNullable into your config (optional)import { provideNullable } from 'ngx-nullable';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideNullable({
character: '---',
separator: ' | ',
displayZero: true
})
]
};
or module
import { provideNullable } from 'ngx-nullable';
@NgModule({
// ...
providers: [
// ...
provideNullable({
character: '---',
separator: ' | ',
displayZero: true
})
]
})
<ul>
<li>{{ -1000 | ngxNullable }}</li>
<li>{{ 1000 | ngxNullable }}</li>
<li>{{ 0 | ngxNullable }}</li>
<li>{{ null | ngxNullable }}</li>
<li>{{ undefined | ngxNullable }}</li>
<li>{{ 'string' | ngxNullable }}</li>
<li>{{ '' | ngxNullable }}</li>
<li>{{ ' ' | ngxNullable }}</li>
</ul>
<ul>
<li>{{ ['', ' ', undefined, null] | ngxNullableJoin }}</li>
<li>{{ ['AAA', 'BBB', 'CCC'] | ngxNullableJoin }}</li>
<li>{{ ['AAA', '', ' ', undefined, null, 'BBB'] | ngxNullableJoin }}</li>
<li>{{ [] | ngxNullableJoin }}</li>
</ul>
@Component({
// ...
})
class Example {
private readonly nullable = inject(NgxNullableService);
public readonly input = signal<string>('');
public readonly computed = computed(() => this.nullable.fromString(this.input()));
}
| Option | Type | Default | Description |
|---|---|---|---|
| character | string | '—' | The character to display when the value is null or undefined |
| separator | string | ', ' | The separator to use when joining multiple values |
| displayZero | boolean | true | Whether to display zero when the value is zero |
None
Copyright © 2024 - 2025 Dominik Hladik
All contents are licensed under the MIT license.
FAQs
This library provides a way to make properties nullable in Angular templates.
We found that ngx-nullable demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.