ng2-bootstrap

ng2-boostrap datePicker seems to overwrite ngModel

血红的双手。 提交于 2019-12-13 07:14:15
问题 I'm utilizing the ng2-bootstrap datePicker, and whether I leave the initial value undefined, or if I use the initDate, I get an unexpected behavior. Right away upon loading the page the variable bound to ngModel of the directive, in my case: [(ngModel)]="campaign.startDate" campaign.startDate logs as: FIRST - today, or an assigned value if I set it arbitrarily in the ngOnInit THEN - takes on the value I have assigned it once my request comes back with a new value THEN - today I have no idea

data binding failed in ng2-select

放肆的年华 提交于 2019-12-12 17:34:34
问题 I am trying to bind array of object to dropdown using ng2-select.It works fine when I tried using array of string private category: Array<object> = [{ "value": 1, "text": "Table" }, { "value": 2, "text": "Chair" }, { "value": 3, "text": "Light"}] and my html as follow: <ng-select [items]="category" [allowClear]="true" placeholder="No country selected"> </ng-select> I have also Imported selectModule in my module.ts 回答1: Format of your data is not correct. Instead of: private category: Array

how to override ng2-boostrap accordion default style with custom css style in angular

孤者浪人 提交于 2019-12-11 00:56:15
问题 I am trying to override the ng2-bootstrap accordion css style with custom style but the style is not getting applied Html <ngb-accordion #acc="ngbAccordion" activeIds="ngb-panel-0"> <ngb-panel class="customclass1" title="Simple"> <ng-template ngbPanelContent> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt

“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

Uncaught Error: Module build failed: Error: No PostCSS Config found in: \ng2-admin\node_modules\bootstrap-loader at Error (native)

醉酒当歌 提交于 2019-12-10 18:56:45
问题 I have clone ng2-admin directory from git hub few days back and run npm install after that i am able to run and see the UI, now I had been deleted node_modules folder, docs folder, and dist folder from ng2-admin now facing below error in browser console with scattered UI. So how to fix below error, ` Uncaught Error: Module build failed: Error: No PostCSS Config found in: D:\ng2-admin\node_modules\bootstrap-loader at Error (native) at D:\ng2-admin\node_modules\postcss-load-config\index.js:51

ng2-bootstrap, call Modal defined in child component from parent compent

纵然是瞬间 提交于 2019-12-10 18:09:31
问题 I am using ng2-bootstrap for the modal stuff. I am trying to separate my modals and my other components apart. So I have the following files: addPlaylist.modal.ts import {Component} from '@angular/core'; import {CORE_DIRECTIVES} from '@angular/common'; import {MODAL_DIRECTVES, BS_VIEW_PROVIDERS} from 'ng2-bootstrap/ng2-bootstrap'; @Component({ selector: 'addplaylist-modal', directives: [MODAL_DIRECTVES, CORE_DIRECTIVES], viewProviders: [BS_VIEW_PROVIDERS], templateUrl: 'app/channel/modals

Lazy loading. No component factory found. Did you add it to @NgModule.entryComponents?

不打扰是莪最后的温柔 提交于 2019-12-10 16:17:15
问题 I create page with simple modal window using ng2-bootstrap library. It looks like: action-list.component.html <a class="btn-setting" (click)="dangerModal.show()"><i class="fa fa-trash"></i></a> <div bsModal #dangerModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-danger" role="document"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Modal title</h4> <button type=

ng2-bootstrap not working in Angular 2 ('alert' is not a known element:)

≯℡__Kan透↙ 提交于 2019-12-10 03:19:00
问题 I've installed ng2-bootstrap on a project running Angular 2.0.1 via: npm install ng2-bootstrap --save I've setup my project like this: //systemjs.config.js (function (global) { System.config({ paths: { // paths serve as alias 'npm:': 'node_modules/' }, // map tells the System loader where to look for things map: { 'moment': 'node_modules/moment/moment.js', 'ng2-bootstrap/ng2-bootstrap': 'node_modules/ng2-bootstrap/bundles/ng2-bootstrap.umd.js', // our app is within the app folder app: 'app',

Angular2 + ng2-material import

╄→гoц情女王★ 提交于 2019-12-08 19:06:26
I'm using angular 2 with ng2-material to display radio and checkbox components, in each component I see that I have to import all the ng2-material contents and finally using only one component => the result, it charges my app and makes it slower. I want to know if I may import only the component that I need, despite that in the ng2-material documentation they are importing all of them ??? import {Component} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {MATERIAL_DIRECTIVES, MATERIAL_PROVIDERS} from "ng2-material/all"; <<<<< import {ROUTER_DIRECTIVES} from

Importing ng2-bootstrap changes my tsc output directory structure

放肆的年华 提交于 2019-12-08 08:01:59
问题 I have the following folder structure dist src module1 m1.ts module2 m2.ts .tsconfig.json ... I have tsc configured to output to dist/js so after running npm run tsc I have the following: dist js module1 m1.js module2 m2.js src ... After much struggle I have managed to integrate ng-bootstrap into my project. If I import from ng2-bootstrap somewhere in my app, for example: import { ACCORDION_DIRECTIVES } from 'ng2-bootstrap/components/accordion'; and run npm run tsc my folder structure changes