ngx-bootstrap

isDevMode / enableProdMode error :Cannot enable prod mode after platform setup

一笑奈何 提交于 2019-12-13 15:15:57
问题 I have just upgraded our project to Angular 4.1.0. This also included upgrading webpack to 2.2.1, and upgrading ngx-boostrap to 1.9.2 amongst other package upgrades. After upgrading all this, I tested everything with webpack dev server, in dev mode and all was fine. I then tried a production webpack build. The build worked fine, but upon running our site I immediately get the error 'Cannot enable prod mode after platform setup'. Having investigated using Chrome dev tools, I can see that ngx

Load self in modal - Angular component

廉价感情. 提交于 2019-12-13 10:31:27
问题 I need to load component in a modal when you access it via it's URL. Need help figuring how that setup should be, I have ngxbootstrap on an angular component and can popup modals in response to e.g.a button click. Can't find anything that shows how entire component template would be loaded in modal when component URL is accessed. Thanks 回答1: You need to have one component for the route, and in it's ngOnInit you can open a modal with the component you want in the modal. To make it reusable,

How to add pop up date pickar using ngX-bootstrap?

Deadly 提交于 2019-12-13 08:19:10
问题 How to add datepickar using ngx-bootstrap? This project uses Angular2 typescript2 ngx-bootstrap. I am doing following things: In HTML : <datepicker class="well well-sm main-calendar" [(ngModel)]="dt" [minDate]="minDate" [showWeeks]="false" [dateDisabled]="dateDisabled"></datepicker> In Module: import { DatepickerModule } from 'ngx-bootstrap/datepicker'; @NgModule({ imports: [ DatepickerModule.forRoot() ]}); 回答1: The feature does not currently exist in the library. There is a discussion on it

ngx-bootstrap typeahead not showing dropdown

懵懂的女人 提交于 2019-12-12 20:06:23
问题 I'm migrating an application from AngularJS to Angular and I've hit a brick wall with the new implementation for typeahead, it's been a day now since and I've tried with several API, finally decided to go for the most similar one to what I was using in AngularJS version (this) So, in my template I do this: (you can also find pluker link at the bottom) <input [(ngModel)]="publication" [typeahead]="publications" typeaheadOptionField="name" typeaheadOptionsLimit="25" placeholder="Type it" class=

How to add custom style to ngx-bootstrap/tooltip

戏子无情 提交于 2019-12-11 02:56:12
问题 I have changed the background and border-colour for tooltip. The arrow in tooltip should be filled with white instead of dark and with the border. Is that possible I have tried in StackBlitz 回答1: Add this in your style.css file. .tooltip.bottom .tooltip-arrow { border: 1px solid #e0e0e0; border-bottom: none; border-right: none; width: 10px; height: 10px; transform: rotate(45deg); background: white; } 回答2: You can set the arrow to white by putting :host ::ng-deep .tooltip-arrow { border-bottom

How to use ngx-bootstrap with angular4 with server side rendering

丶灬走出姿态 提交于 2019-12-10 23:35:01
问题 i have installed ngx-bootstrap and using angular-cli 1.0.1 and done universal setup with the help of Roberto Auler's Post. I have added path of bootstrap file in angular-cli.json styles "styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.css", "styles.css" ], I am using AlertModule for testing and its throwing error C:\Users\Praveen\Desktop\Projects\Angular2\universaltest\node_modules\ngx-bootstrap\alert\alert.module.js:1 (function (exports, require, module, __filename, __dirname) {

ngx bootstrap: How to get data from nested Modal?

心不动则不痛 提交于 2019-12-10 23:09:03
问题 I have an Angular component that displays a modal using the BsModalService service of ngx-bootstrap . I can pass data to my nested component using the content property. This works well so far. On this modal, there is button which should open up another modal to prompt the user for input (textarea). When the user presses submit on this second modal, both the modals must be closed and the parent component must call a REST service and pass the reason captured in the textarea(via the second modal

“Angular powered bootstrap” is “ngx-bootstrap”?

那年仲夏 提交于 2019-12-10 20:26:23
问题 I am making a project using "Angular powered Bootstrap", but after 4 weeks of development I found out that there is also something like "ngx-bootstrap". Are they the same thing? - If not, then which one of them is ng-bootstrap ? Is ngx-bootstrap dead ? 回答1: Those are completely 2 separate projects run by 2 different teams. ng-bootstrap is here: demo: https://ng-bootstrap.github.io/ GitHub: https://github.com/ng-bootstrap/ng-bootstrap npm: https://www.npmjs.com/package/@ng-bootstrap/ng

How to change message “Invalid Date” in ngx bootstrap datepicker without being in node modules

流过昼夜 提交于 2019-12-10 18:11:33
问题 I changed the language of my datepicker but the message that appears is still in English. I know it is inside ngx-bootstrap / chronos / locale / locale.defaults.ts where it brings the following information export declare const defaultInvalidDate = "Invalid date"; I would also like to change this message. Is there any information I have to add to the "input [bsConfig] =" ... Anyway, where can I change this message without moving the Node Modules folder? Thank you. 回答1: I finally managed to do

How to customize the ngx-bootstrap datepicker

我的未来我决定 提交于 2019-12-10 17:07:42
问题 I want to customize the ngx-bootstrap datepicker popup. Basically I want to add link/button in the calendar showing date and on click of that date will get added to date picker field. I couldn't find any way to customize the datepicker. I am using Angular 5 and ngx-bootstrap: https://valor-software.com/ngx-bootstrap/#/datepicker Thanks in advance. 回答1: You could create a custom component based on the original datepicker adding custom element to template making it look like an integrated