Loading...
Loading...
ALWAYS use when working with Angular Bootstrap, ng-bootstrap, Bootstrap components in Angular, or Bootstrap 5 integration.
npx skill4agent add oguzhan18/angular-ecosystem-skills angular-bootstrapnpm install @ng-bootstrap/ng-bootstrap @popperjs/core bootstrap{
"styles": ["node_modules/bootstrap/dist/css/bootstrap.min.css"]
}import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
@NgModule({
imports: [NgbModule]
})
export class AppModule {}import { NgbCarouselModule } from '@ng-bootstrap/ng-bootstrap';
@Component({
standalone: true,
imports: [NgbCarouselModule],
// ...
})
export class CarouselComponent {}import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
@Component({})
export class ModalComponent {
constructor(private modalService: NgbModal) {}
open(content: TemplateRef<any>) {
this.modalService.open(content);
}
}import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
@Component({
template: `
<div ngbDropdown>
<button ngbDropdownToggle>Menu</button>
<div ngbDropdownMenu>
<button ngbDropdownItem>Action</button>
</div>
</div>
`
})
export class DropdownComponent {}import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
@Component({
template: `
<ngb-accordion>
<ngb-panel title="First">
<ng-template ngbPanelContent>Content 1</ng-template>
</ngb-panel>
</ngb-accordion>
`
})
export class AccordionComponent {}import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
@Component({
template: `
<ngb-datepicker [(ngModel)]="date"></ngb-datepicker>
`
})
export class DatePickerComponent {
date: NgbDateStruct;
}import { NgbToast } from '@ng-bootstrap/ng-bootstrap';
@Component({
template: `
@for (toast of toasts; track toast) {
<ngb-toast>{{ toast }}</ngb-toast>
}
`
})
export class ToastComponent {}import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
@Component({
template: `
<input ngbTypeahead [ngModel]="value" [source]="search" />
`
})
export class TypeaheadComponent {
search = (text$: Observable<string>) =>
text$.pipe(debounceTime(200), distinctUntilChanged());
}