
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.
ng2-editable
Advanced tools
In-place editing for Angular2
ng2-editable is available via npm:
npm install --save ng2-editable
Use it by improting EditableModule into your module:
import { EditableModule } from 'ng2-editable';
@NgModule({
imports: [
EditableModule,
...
]
})
To use components in other modules, also add EditableModule to exports.
Include the components you need into your HTML file, specifying the property you want to bind to.
<ng2-text-editable [(text)]="myText"</ng2-text-editable>
ng2-editable uses two-way binding, so no event handlers are required.
The component will render the property you provide. On click, it will replace it with an <input> or <select> element. It will return to default state if you click anywhere else.
All ng2-editable components expose a (toggled) Output which will fire whenever the component changes state. It emits an object with the following interface:
interface ToggleEvent {
isActive: boolean;
isChanged: boolean;
};
A simple component for editing strings.
selector: ng2-text-editable
property name: text
Same as text editable, but takes dates and provides a calendar.
selector: ng2-date-editable
property name: date
This component allows selecting an option from a dropdown list.
selector: ng2-selectable
property name: value
options: the list of options to select from, must be an array of any type.
valueProperty: the property which will be used as the value of the option; defaults to id
labelProperty: the property of the object which will be displayed; defaults to label
valueAccessor: a function which takes an element of the list and returns its value; has precedence over valueProperty
labelAccessor: a function which renders an element of the list as a string; has precedence over labelProperty
<ng2-selectable [(value)]="userId" [options]="users"
[labelAccessor]="getUserLabel">
</ng2-selectable>
public getUserLabel = (user) => `${user.name} (${user.organization})`;
A component that displays boolean states.
selector: ng2-toggleable
property name: value
showFalse: if true, does not display anything if value is true; defaults to false.
Contributions are welcome on Github.
FAQs
In-place editing for Angular2
We found that ng2-editable 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
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.