ng-bootstrap

How to pass data modal Component to parent Component using ng-bootstrap in angular 4

喜你入骨 提交于 2020-04-10 18:42:30
问题 I tried below coding for pass data from modal component to parent component. package.json "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.3" app.component.html <button class="btn btn-primary" (click)="openModal()">Open</button> app.component.ts import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; export class AppComponent { constructor(private modalService: NgbModal) { } openModal() { const modalRef = this.modalService.open(AppModalComponent); } } app-modal.component.html <h1>{

Why my submit button change his colour when its disabled because I selected other radio button in Angular 9

一世执手 提交于 2020-03-25 18:40:23
问题 The problem I have right now is that I have my login and has two radio buttons one is selected for default until now its all fine, the submit button looks disabled but in the moment i click the other radio button the colour of the submit button change to the colour that it should have when is available. Even when the colour of the button change you cant send the information until you put the correct data. How can I solve this problem? . I'm using angular material , ng-bootstrap and scss .

How to pass parameteres to modal?

三世轮回 提交于 2020-02-19 09:33:14
问题 That's the way I use the ng2-bootstrap modal: import {Component} from '@angular/core'; import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'add-customer-modal', template: ` <template #test let-c="close" let-d="dismiss"> <div class="modal-header"> <button type="button" class="close" aria-label="Close" (click)="d('Cross click')"> <span aria-hidden="true">×</span> </button> <h4 class="modal-title">Modal title</h4> </div> <div class="modal-body"> </div> <div class="modal

Getting the following error while trying to display image “blocked:other”

有些话、适合烂在心里 提交于 2020-02-14 05:37:13
问题 Angular 6 ngBootstrap website (blocked:other) The better728x90.gif exists in the correct folder, not sure why I'm gettin this error and other 404s on images that do exist. The following path is correct: <a href="assets/images/banners/better728x90.gif"> <img src="assets/images/banners/better728x90.gif" width="728" height="90" class="fit"><br> </a> When I check out the img element in the chrome inspector I see this: img[src="assets/images/banners/better728x90.gif"] { display: none !important; }

Getting the following error while trying to display image “blocked:other”

荒凉一梦 提交于 2020-02-14 05:36:10
问题 Angular 6 ngBootstrap website (blocked:other) The better728x90.gif exists in the correct folder, not sure why I'm gettin this error and other 404s on images that do exist. The following path is correct: <a href="assets/images/banners/better728x90.gif"> <img src="assets/images/banners/better728x90.gif" width="728" height="90" class="fit"><br> </a> When I check out the img element in the chrome inspector I see this: img[src="assets/images/banners/better728x90.gif"] { display: none !important; }

how to format ng bootstrap typeahead results by numerically ascending

自古美人都是妖i 提交于 2020-02-06 19:01:25
问题 I'm currently using ng-boostrap specifically the typeahead portion to display the results for my typeahead. Everything is working great except that i can't get it to format my results numerically to show the least amount to highest amount that matched. so if i had a list like this.. numbers = [12, 22, 43, 11, 1, 4, 77, 111]; I would want the 1 to pop up first and 11, 1111 after and so on... here is what my code looks like now... formatter = (result: string) => result.orderBy(numbers);

how to format ng bootstrap typeahead results by numerically ascending

梦想的初衷 提交于 2020-02-06 19:00:04
问题 I'm currently using ng-boostrap specifically the typeahead portion to display the results for my typeahead. Everything is working great except that i can't get it to format my results numerically to show the least amount to highest amount that matched. so if i had a list like this.. numbers = [12, 22, 43, 11, 1, 4, 77, 111]; I would want the 1 to pop up first and 11, 1111 after and so on... here is what my code looks like now... formatter = (result: string) => result.orderBy(numbers);

Custom NgbModal service to set default config on open does not find an entry component

扶醉桌前 提交于 2020-01-16 05:39:48
问题 I want all the modals in our application to have a set of default options, and not have to apply them individually each time a modal is opened. So I created a service that extends NgbModal so I could overwrite the open method since in NgBootstrap v1.1.2 there is no global config, but the entry component though listed in the feature module is not found. I'm wondering if the service being provided in /core doesn't see entry components loaded in a feature module? Using NgbModal directly the

How to translate ng-bootstrap input date-picker - NgbInputDatepicker i18n?

老子叫甜甜 提交于 2020-01-15 09:36:47
问题 We are using the 'ng-bootstrap' date picker input component. While the date-picker itself can be translated using NgbDatepickerI18n according to the example at this plnkr, the input date picker uses the NgbInputDatepicker directive. How can this directive be translated using the same services that are used for translating the date-picker? 回答1: You would use the exact same way. The NgbInputDatepicker, when toggled, displays an NgbDatepicker, which gets its labels from a service. 来源: https:/

angular 6使用总结

落花浮王杯 提交于 2020-01-08 04:01:11
一,安装angular6 D:\cmf\angular6> npm install -g @angular/cli C:\Users\Administrator\AppData\Roaming\npm\ng -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\@angular\cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","a rch":"x64"}) + @angular/cli@6.1.3 added 243 packages in 91.487s 二.创建项目 ng new 项目名称 D:\cmf\angular6> ng new project1 cd project1 进入项目目录 ng serve --open