ng2-bootstrap

ng2-bootstrap pagination and bootstrap table integration error

拈花ヽ惹草 提交于 2020-01-23 09:09:49
问题 I'm trying to integrate ng2-bootstrap pagination component and bootstrap table. I have a simple bootstrap table that is loaded with ngFor directive: <tr> <th *ngFor="#col of cols">{{col.header}} </tr> </thead> <tbody> <tr *ngFor="#row of rows"> <td *ngFor="#col of cols">{{row[col.field]}}</td> </tr> </tbody> The rows content is determined by the pagination component: I have an array called data that contains a bunch of entries for the table. The array length is used to determined the

ng2-bootstrap pagination and bootstrap table integration error

匆匆过客 提交于 2020-01-23 09:08:13
问题 I'm trying to integrate ng2-bootstrap pagination component and bootstrap table. I have a simple bootstrap table that is loaded with ngFor directive: <tr> <th *ngFor="#col of cols">{{col.header}} </tr> </thead> <tbody> <tr *ngFor="#row of rows"> <td *ngFor="#col of cols">{{row[col.field]}}</td> </tr> </tbody> The rows content is determined by the pagination component: I have an array called data that contains a bunch of entries for the table. The array length is used to determined the

Run Spring4MVC with Angular 2 on a single server

北城以北 提交于 2019-12-28 08:08:21
问题 I am new to angular2, I want to know what is the possible file structure for SpringMVC4 with angular 2? As shown in image, it will work for Angular 1.x but file structure of Angular 2 is quite different and its component driven, and I am using angular 2 file structure as given below I searched a lot and I found that we can use Front end(using angular2) and back end(server- using spring/springboot) separately, but we need 2 server to run application. For example, Frontend : 192.168.100.1:4200

Angular 2 - Bootstrap (Ng2-Bootstrap) typeahead implementation

自作多情 提交于 2019-12-25 06:58:29
问题 I'm trying to implement the NG2-Bootstrap typeahead with no success. This is my code: import {Component} from "angular2/core"; import {CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/common'; import {TYPEAHEAD_DIRECTIVES} from 'ng2-bootstrap'; @Component({ selector: "side-bar", directives: [TYPEAHEAD_DIRECTIVES, CORE_DIRECTIVES, FORM_DIRECTIVES], template: ` <div class="searchArea" [ngClass]="{searchAreaForceLargeWidth: forceShowSearch}"> <form class="searchBlock" [ngClass]="

How can i modify the design of Line Chart using ng2-chart?

谁说我不能喝 提交于 2019-12-24 21:28:52
问题 This is my current chart which i created using ng2-charts library. It can give me my data output as popup on mouse hover. Instead of this i need fixed block which contain my company logo and name. I don't have any idea how to modify this html. For getting list of companies at given stage, callbacks: { title: function (tooltipItems, data) { return (tooltipItems[0] || {})['xLabel']; }, label: function (tooltipItems, data) { let dummyValue : any[] = [ {id:123, user: "Test Data 1", stage: "Stage

How to get access to `BsModalRef` in opened modal component?

烂漫一生 提交于 2019-12-24 10:14:36
问题 I'm quite new to Angular 4.I have been working on Angular 1.5.x and now converting same application in Angular 4 with ngUpgrade hybrid approach. I'm using ngx-bootstrap modal component in my hybrid application in order to replace existing modal service. I found some problem in following guide ngx-bootstrap-modal with service. Having problem with this statement If you passed a component to .show() you can get access to opened modal by injecting BsModalRef I'm copying same example here, export

Is there a way to build the mobile nav bar in ng2-bootstrap?

喜你入骨 提交于 2019-12-17 17:53:15
问题 I've been implementing ng2-bootstrap and Angular2. I cannot figure out how to make the mobile navbar open / close. Is this something that just isn't supported yet? Or am I missing something? Update, html: <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span

Angular 2 ng2-bootstrap modal inside child component called from parent component

与世无争的帅哥 提交于 2019-12-17 06:54:11
问题 Hard to explain this. I had a simple working ng2-bootstrap modal example working. I expanded it to include Boostrap 4 Jumbotron example template for my home page, now the ng2-bootstrap modal does nothing. I can see the this.childModal.show() in child modal component is getting called on the button click, but nothing happens. No error in Chrome console and no modal shows. I have no idea what to do next :-/ // ============================================================================ // /src

Alert in Meteor Angular 2 app only appears after click in browser

心不动则不痛 提交于 2019-12-13 15:59:10
问题 I've implemented the ng2-bootstrap ngb-alert on a page of a Meteor Angular 2 app. When I push an alert to the alerts array in typescript, the alert is only displayed after i click the browser window again. The push is done within a callback of the Accounts.createUser function. If the push is done within the signup method (and not the Accounts.createUser callback function) the alert is displayed immediate. I've also tried to use an async pipe in the ngFor and use a Promise type for the alerts

Why date pipe doesn't work properly with ng2-bootstrap in Angular 2

北城余情 提交于 2019-12-13 07:22:10
问题 I want to show date in next format: dd/MM/yyyy , but it only shows in MM/dd/yyyy . Here is my startdateComponent : import {Component, EventEmitter, Output, Input} from '@angular/core'; import {DATEPICKER_DIRECTIVES} from 'ng2-bootstrap/components/datepicker'; @Component({ templateUrl:'./app/home/item_component/start_date_component/start_date_component.html', directives: [DATEPICKER_DIRECTIVES] }) export class StartDateComponent () { chosenDate : Date = new Date(); getDate() { return this