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.
@s-libs/ng-app-state
Advanced tools
Changelog
11.0.0-next.0 (2020-11-21)
ng-core
and ng-app-state
, and ng-dev
now require angular 11Readme
Painlessly integrate app-state
into template-driven Angular forms.
Install along with its peer dependencies using:
npm install --save @s-libs/ng-app-state @s-libs/app-state @s-libs/ng-core @s-libs/rxjs-core @s-libs/js-core @s-libs/micro-dash
# OR
yarn add @s-libs/ng-app-state @s-libs/app-state @s-libs/ng-core @s-libs/rxjs-core @s-libs/js-core @s-libs/micro-dash
In your module, import NasModelModule
, e.g.:
// app.module.ts
import { NasModelModule } from "@s-libs/ng-app-state";
@NgModule({
imports: [NasModelModule],
})
export class AppModule {}
This library includes the [nasModel]
directive that you can use in place of [(ngModel)]
to bind form controls directly to store objects. For example, to edit the current user's name in the example above:
@Component({
template: `<input [nasModel]="nameStore" />`,
})
class AccountSettingsComponent {
nameStore: Store<string>;
constructor(myStore: MyStore) {
this.nameStore = myStore("currentUser")("name");
}
}
[nasModel]
is tested to work with all standard form controls. Except where noted, they all bind to Store<string>
objects.
<input type="checkbox">
- binds to Store<boolean>
<input type="color">
<input type="date">
<input type="datetime-local">
<input type="email">
<input type="month">
<input type="number">
- binds to Store<number>
<input type="password">
<input type="radio">
<input type="range">
- binds to Store<number>
<input type="search">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">
<input>
<select multiple>
- binds to Store<string[]>
<select>
<textarea>
FAQs
Painlessly integrate [`app-state`](https://github.com/simontonsoftware/s-libs/projects/app-state) into template-driven Angular forms.
The npm package @s-libs/ng-app-state receives a total of 480 weekly downloads. As such, @s-libs/ng-app-state popularity was classified as not popular.
We found that @s-libs/ng-app-state 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
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.