ng-bootstrap

ng-bootstrap ngbDropdown not working in angular 4

余生颓废 提交于 2019-12-07 08:27:13
问题 At my angular 4 application is the ngbDropdown-Element from ng-bootstrap not working. I have installed the following npm modules for this case: "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.22", "bootstrap": "4.0.0-alpha.6", "bootstrap-sass": "^3.3.7", My app.module.ts is looking like this: import { BrowserModule } from "@angular/platform-browser" import { NgModule } from "@angular/core"; import { FormsModule } from "@angular/forms"; import { HttpModule } from "@angular/http"; import {

ng-bootstrap datepicker not working

試著忘記壹切 提交于 2019-12-07 08:08:52
问题 I am trying to use ng-bootstrap date picker in my angular2 project but getting following error. There is no directive with "exportAs" set to "ngbDatepicker" Here is my code <form class="form-inline"> <div class="form-group"> <div class="input-group"> <input class="form-control" placeholder="yyyy-mm-dd" name="dp" [(ngModel)]="model" ngbDatepicker #d="ngbDatepicker"> <button class="input-group-addon" (click)="d.toggle()" type="button"> <img src="img/calendar-icon.svg" style="width: 1.2rem;

ng-bootstrap modal is not displaying

时光总嘲笑我的痴心妄想 提交于 2019-12-07 02:32:34
问题 Am using ng-bootstrap modal in my application to show dialogue box. but while clicking the button, nothing is happening, the modal is not displaying. while debugging it could find that the action is getting called, but the modal is not showing. this is my app.module.ts import {NgModule } from '@angular/core'; import {BrowserModule } from '@angular/platform-browser'; import {TaskService} from '../app/task/task.service'; import {TaskComponent} from '../app/task/task.component'; import

Getting started Angular2 RC5 with ng-bootstrap 404 Error

百般思念 提交于 2019-12-06 10:40:21
问题 I have followed the instructions for installation on the ng-bootstrap website with a fresh git clone of Angular2, but receive a 404 Error when NgbModule is in the import array of @NgModule . Screencap of error: 404 Error loading @ng-bootstrap Steps: Cloned Angular2's quickstart git repo github.com/angular/quickstart Edit app.module.ts to the following: import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app

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

為{幸葍}努か 提交于 2019-12-06 09:11:36
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 = `Closed with: ${result}`; }, (reason) => { this.closeResult = `Dismissed ${this.getDismissReason(reason)}`

angular 2 ng-bootstrap datepicker popup

孤街醉人 提交于 2019-12-06 01:41:31
问题 Hi I am investigating on ng-bootstrap datepicker. I looked at the demo code and was able to get it to work in my application. However, if I added more than 1 datepicker input tags, only one is working. Below are the code I created. I tried to change the #d to #d1 and #d2 (also change the toggle() part) and the page spits out errors. <div class="input-group"> <input class="form-control" placeholder="yyyy-mm-dd" name="dp" [(ngModel)]="newItem.EndTime" ngbDatepicker #d="ngbDatepicker" required>

Angular2 ng-bootstrap: Reuse modal template with different data

╄→гoц情女王★ 提交于 2019-12-05 21:06:27
I am building a dashboard-like interface with a set of entities containing comparable data. Each of these entities have an edit-button which I would like to use to open a modal with the respective data displayed. I would like to reuse the same modal template, and display the data from the entity who's edit-button was clicked. I am using Angular2 with ng-bootstrap , which relies on Bootstrap 4 . From the ng-bootstrap modal docs , and it's accompanying plunkr , I was able to create my own working modal component like so (simplified for layout): //editmodal.html <template #content let-c="close"

ng-bootstrap ngbDropdown not working in angular 4

ぐ巨炮叔叔 提交于 2019-12-05 17:04:16
At my angular 4 application is the ngbDropdown-Element from ng-bootstrap not working. I have installed the following npm modules for this case: "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.22", "bootstrap": "4.0.0-alpha.6", "bootstrap-sass": "^3.3.7", My app.module.ts is looking like this: import { BrowserModule } from "@angular/platform-browser" import { NgModule } from "@angular/core"; import { FormsModule } from "@angular/forms"; import { HttpModule } from "@angular/http"; import { AppComponent } from "./app.component"; import { FileitHeaderComponent } from "./fileit-header/fileit-header

ng-bootstrap datepicker format

淺唱寂寞╮ 提交于 2019-12-05 16:20:31
问题 I am using ng-bootstrap datepicker but when I save my form the date gets saved as. date: { day: 01, month: 12, year: 16 } I was hoping I could get it to save as something more like "2016-11-23T00:39:31.768Z" Here is my implementation: <div class="input-group"> <button class="input-group-btn" (click)="d.toggle()" > <md-icon svgSrc="assets/images/calendar-plus.svg" style="cursor: pointer;"></md-icon> </button> <input class="form-control" placeholder="dd-mm-yyyy" name="dp" formControlName="due

ng-bootstrap datepicker not working

空扰寡人 提交于 2019-12-05 09:36:24
I am trying to use ng-bootstrap date picker in my angular2 project but getting following error. There is no directive with "exportAs" set to "ngbDatepicker" Here is my code <form class="form-inline"> <div class="form-group"> <div class="input-group"> <input class="form-control" placeholder="yyyy-mm-dd" name="dp" [(ngModel)]="model" ngbDatepicker #d="ngbDatepicker"> <button class="input-group-addon" (click)="d.toggle()" type="button"> <img src="img/calendar-icon.svg" style="width: 1.2rem; height: 1rem; cursor: pointer;"/> </button> </div> Any help would be appriciated I had same problem. In my