ngx-bootstrap

How to use ngx-bootstrap in Angular 4 application with SystemJs module system

隐身守侯 提交于 2019-12-10 14:49:59
问题 I have tried out many variations of specifying path for allowing SystemJS to load the ngx-bootstrap package System.config({ "defaultJSExtensions": true, "paths": { "@angular/core": "node_modules/@angular/core/bundles/core.umd.js", "@angular/forms": "node_modules/@angular/forms/bundles/forms.umd.js", "@angular/http": "node_modules/@angular/http/bundles/http.umd.js", ... "*": "node_modules/*", "ngx-bootstrap": "node_modules/ngx-bootstrap", "highcharts": "node_modules/highcharts/highcharts.js",

how to create google autocomplete in bootstrap modal in angular 2+?

帅比萌擦擦* 提交于 2019-12-10 01:34:56
问题 I am using angular google maps (agm) i created google autocomplete by below way. in html <input type="text" #pick id="address" class="form-control" [(ngModel)]="pickAddress" name="pickAddress" (ngModelChange)="pickAdd()" placeholder="Pick Up Address" onclick="return false" style="padding-left: 30px;border-radius: 25px;border: 1px solid #31708f;" in Ts File: pickAdd() { var autocomplete:any; var options = { componentRestrictions: {country: "IN"} }; this. inputAddress = document.getElementById(

Angular 6 and bootstrap 4: date picker

核能气质少年 提交于 2019-12-09 01:09:00
问题 I have a form which contain a date picker / calender, email, city name and hotel name, I want a user to select a date and enter other fields and submit the data. This is what I have. HTML: <form [formGroup]="angForm" class="form-element"> <div class="form-group"> <label for="dateOfBirth">Date of Birth</label> <input id="dateOfBirth" name="dateOfBirth" [(ngModel)]="dateOfBirth" type="text" bsDatepicker class="form-control" /> </div> <div class="form-group form-element_email"> <input type=

Change language to pt-br [ngx-boostrap]

℡╲_俬逩灬. 提交于 2019-12-08 07:35:42
问题 How i can change de langiage os BSdatePicker to pt_br I tried to modify in bs-locale-service so i have this mensage of error Khronos locale error: please load locale "pt-br" before using it 回答1: First step is to add locale to Chronos import { defineLocale } from 'ngx-bootstrap/chronos'; import { ptBrLocale } from 'ngx-bootstrap/locale'; defineLocale('pt-br', ptBrLocale); Second step, say datepicker to use this locale: constructor(private localeService: BsLocaleService) { localeService.use('pt

how to create google autocomplete in bootstrap modal in angular 2+?

蓝咒 提交于 2019-12-05 02:14:30
I am using angular google maps (agm) i created google autocomplete by below way. in html <input type="text" #pick id="address" class="form-control" [(ngModel)]="pickAddress" name="pickAddress" (ngModelChange)="pickAdd()" placeholder="Pick Up Address" onclick="return false" style="padding-left: 30px;border-radius: 25px;border: 1px solid #31708f;" in Ts File: pickAdd() { var autocomplete:any; var options = { componentRestrictions: {country: "IN"} }; this. inputAddress = document.getElementById('address'); autocomplete = new google.maps.places.Autocomplete(this.inputAddress,options) google.maps

Angular 5 ngx-bootstrap form validation

蹲街弑〆低调 提交于 2019-12-04 06:04:45
I'm reading Ari Lerner's ng-book on Angular 5. I'm using ngx-bootstrap and Bootstrap 4 . Form validation doesn't seem to be working the way Mr. Lerner implements. I'm not sure if this is a limitation of ngx-bootstrap ...anyone know? edit Ok, I removed ngx-bootstrap and just loaded up the MaxCDNs for Bootstrap 4 and I have the same problem. The error message is not appearing. app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { NavbarComponent } from './navbar/navbar.component'

How can I use Bootstrap navbar in ngx-bootstrap for Angular 5?

匆匆过客 提交于 2019-12-03 18:34:20
问题 Bootstrap navbar doesn't exist in the ngx-bootstrap components list. Please help me to implement it. 回答1: There's no implementation of navbar as a separate component but it can be done with Collapse Module. Example = https://stackblitz.com/edit/ngx-bootstrap-rc8ab4?file=app%2Fapp.component.ts MODULE // App imports import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { CollapseModule } from

How to change the date format in the datepicker of Angular ngx-bootstrap inside a form

▼魔方 西西 提交于 2019-12-03 17:47:39
问题 Using ngx-bootstrap Datepicker in an Angular 4 application, I know that normally you can specify the date format this way: <input id="from" name="from" bsDatepicker [(bsValue)]="myModel" value="{{ myModel | date:'yyyy-MM-dd'}}"> but this time I'm inside a template-driven Angular form, so my input is not bound to a variable like myModel in the example above, but it's just bound to the form: <input id="from" name="from" bsDatepicker ngModel> so how can I specify the date format in this case?

How to change the date format in the datepicker of Angular ngx-bootstrap inside a form

那年仲夏 提交于 2019-12-03 13:22:52
Using ngx-bootstrap Datepicker in an Angular 4 application, I know that normally you can specify the date format this way: <input id="from" name="from" bsDatepicker [(bsValue)]="myModel" value="{{ myModel | date:'yyyy-MM-dd'}}"> but this time I'm inside a template-driven Angular form, so my input is not bound to a variable like myModel in the example above, but it's just bound to the form: <input id="from" name="from" bsDatepicker ngModel> so how can I specify the date format in this case? Edit : it looks like that a way to achieve this is by creating a new variable newVar inside the component

difference between ngx-bootstrap and ng2 bootstrap?

可紊 提交于 2019-12-03 10:29:50
问题 I'm making project in bootstrap (UI) and angular 2. I'm new to both things My friend suggests me to use ng2 bootstrap I am so much confused between ngx bootstrap and ng2 bootstrap. Always when I search ng 2 bootstrap it take me to the ngx bootstrap. What is the difference between the two? 回答1: ng2-bootstrap and ngx-bootstrap are one and the same: ng2-bootstrap was the old name, ngx-bootstrap is the new name. It's a project that's attempting to create an Angular-specific version of the Twitter