ng-bootstrap

Why is the Bootstrap 4 Navbar always collapsed? [duplicate]

风流意气都作罢 提交于 2019-12-23 18:04:30
问题 This question already has an answer here : Bootstrap 4 toggleable navbar (1 answer) Closed 2 years ago . I updated to the v1.0-beta of ng-bootstrap. Now the navbar is always collaped. When I click on the hamburger to toggle the menu, it opens, but displays the contents vertically rather than horizontally. I've included the code for the nav below. It's the same as it before. At this point I can't tease out if the issue lies with ng-bootstrap, bootstrap 4 or a combination thereof. My ideal

ngbModal as a generic Confrimation Box

回眸只為那壹抹淺笑 提交于 2019-12-23 07:36:34
问题 I am trying to create generic confirmation box using ngbmodal, which will be used across the App. In which, Title and message will be passed to the modal from the calling component. I created as a DialogService and added in the entryComponents. Now I am able to show the Confirmation box. But not able to get the result. Below is the code to show the ConfirmationBox component. How to get the value from it const modalRef = this.modalService.open(ConfirmationBoxComponent,{backdrop:"static"})

How To pass let-c=“close” of modal template to other component's html angular 5

可紊 提交于 2019-12-22 17:39:30
问题 I'm new to angular 4 and please help me with this. I have one component having modal template. Component :- import {Component} from '@angular/core'; import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'ngbd-modal-basic', templateUrl: './modal-basic.html' }) export class NgbdModalBasic { closeResult: string; constructor(private modalService: NgbModal) {} open(content) { this.modalService.open(content).result.then((result) => { this.closeResult =

How To pass let-c=“close” of modal template to other component's html angular 5

余生颓废 提交于 2019-12-22 17:38:12
问题 I'm new to angular 4 and please help me with this. I have one component having modal template. Component :- import {Component} from '@angular/core'; import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'ngbd-modal-basic', templateUrl: './modal-basic.html' }) export class NgbdModalBasic { closeResult: string; constructor(private modalService: NgbModal) {} open(content) { this.modalService.open(content).result.then((result) => { this.closeResult =

ng-bootstrap typeahead: how to handle Observable<Person[]> rather than Observable<string[]>

假装没事ソ 提交于 2019-12-22 08:57:44
问题 I've a newbie Angular/Typescript question. I followed the Wikipedia example defined in ng-bootstrap typeahead and I decided to replace the Wikipedia call with a custom REST service that provides the following GET call: GET /person/name/{name} and returns a list of persons matching the name, where each person is: Person(id:long, name:string, surname:string) Now from the typescript part and the angular part everything works fine if I map(...) the array of persons to an array of string of names

NgbDatePicker - How to bind longDate string to [ngModel]?

此生再无相见时 提交于 2019-12-22 06:55:41
问题 I am trying to bind a date formatted as a "longDate" string to the [ngModel] input value in ngbDatePicker. For example, when the user picks a date, I'd like to display "January 15, 2017" instead of "2017-01-15". I understand that [ngModel] binds to an object of type NgbDateStruct only, and it seems to me that when I pass an object of type NgbDateStruct (let's call it selectedStartDate as shown in code below) to [ngModel] then NgbDateParserFormatter.format(selectedStartDate) gets called behind

How to change model structure of angular powered bootstrap ngbDatepicker

故事扮演 提交于 2019-12-22 04:31:21
问题 I am using angular powered bootstrap ngbDatepicker. I have created my own custom control which will be used in different pages for date capturing as follows. <form-date [label]="'Date of birth'" [name]="'inputCPDDOB'" [(ngModel)]="birthDate" placeholder="mm/dd/yyyy" required > </form-date> Here I have passed birthDate as my model object. I want User should be able to choose the date by clicking the CAL button (beside the text box), User should be able to type a date in format 'MM/DD/YYYY' in

How to change model structure of angular powered bootstrap ngbDatepicker

♀尐吖头ヾ 提交于 2019-12-22 04:31:08
问题 I am using angular powered bootstrap ngbDatepicker. I have created my own custom control which will be used in different pages for date capturing as follows. <form-date [label]="'Date of birth'" [name]="'inputCPDDOB'" [(ngModel)]="birthDate" placeholder="mm/dd/yyyy" required > </form-date> Here I have passed birthDate as my model object. I want User should be able to choose the date by clicking the CAL button (beside the text box), User should be able to type a date in format 'MM/DD/YYYY' in

stop closing the modal by clicking backdrop or outside the modal

北战南征 提交于 2019-12-21 03:34:34
问题 I have used one angular2 ng-bootstrap modal in our code. I want the modal will not close when I click outside the modal. Currently the modal is getting closed while clicking outside. In angular1 I used to do this by [keyboard]="false" [backdrop]="'static'". But this is time it is not working in angular2. Here is my plunker My Open method is as follows: open() { const modalRef = this.modalService.open(NgbdModalContent); modalRef.componentInstance.name = 'World'; } 回答1: As per the answer of

How to implement Bootstrap 4 for Angular 2 ngb-pagination

余生长醉 提交于 2019-12-20 20:19:21
问题 I have a Angular2 app with a component where I have a table. Table is generated via *ngFor directive. Each row of the table is an object with 9 fields that is being loaded from the backend when the component is initialized. In the app I'm trying to use ng-bootstrap for angular module. ng-boorstrap In particular I'm trying to implement the pagination component. Could somebody explain how to put the code so it would render e.g. only 10 rows per page pls? Or give me a reference where the