
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.
ng2-expansion-panels
Advanced tools
This is a component for Angular 2. Design is inspired by Material Design's component Expansion Panels.
Development is in very early stage
Check out the live demo (with source code) here http://www.webpackbin.com/EJOlX3j6Z.
npm install ng2-expansion-panels --save
Ensure you import the module:
import { ExpansionPanelsModule } from 'ng2-expansion-panels';
// please notice this is the new way of telling a Component
// to import another component...no more directives[]
@NgModule({
imports: [ExpansionPanelsModule]
})
export class MyModule {}
onOpen
- [?onOpen(panel: ExpansionPanelComponent)
] - event fired when a panel is openedonClose
- [?onClose(panel: ExpansionPanelComponent)
] - event fired when a panel is closedonSubmit
- [?onSubmit()
] - event fired when submit
is calledonCancel
- [?onCancel()
] - event fired when cancel
is called<expansion-panels-container>
<expansion-panel>
<expansion-panel-title>
Title
</expansion-panel-title>
<expansion-panel-description-hidden>
Description when hidden
</expansion-panel-description-hidden>
<expansion-panel-description-toggled>
Description when toggled
</expansion-panel-description-toggled>
<expansion-panel-content>
Content
</expansion-panel-content>
</expansion-panel>
</expansion-panel>...</expansion-panel>
</expansion-panel>...</expansion-panel>
</expansion-panel>...</expansion-panel>
</expansion-panels-container>
Every panel has already defined two methods, cancel
and submit
. In order to bind those
to the buttons we define, we need to create a reference to the panel. In this example, I called it #panel
and them I'm calling panel.cancel() and panel.submit().
It is possible to listen to these events with the outputs onCancel
and onSubmit
.
<expansion-panels-container>
<expansion-panel (onCancel)='resetForm()' (onSubmit)='saveForm()'>
<expansion-panel-title>
Title
</expansion-panel-title>
<expansion-panel-description-hidden>
Description when hidden
</expansion-panel-description-hidden>
<expansion-panel-description-toggled>
Description when toggled
</expansion-panel-description-toggled>
<expansion-panel-content>
Content
</expansion-panel-content>
<expansion-panel-buttons>
<button (click)='pancel.cancel()'>Cancel</button>
<button (click)='pancel.submit()'>Submit</button>
</expansion-panel-buttons>
</expansion-panel>
</expansion-panels-container>
FAQs
Expansion Panels component for Angular 2
The npm package ng2-expansion-panels receives a total of 58 weekly downloads. As such, ng2-expansion-panels popularity was classified as not popular.
We found that ng2-expansion-panels 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.