Category : angular-bootstrap

I am using this carousel. I want something like the multiple-item carousel here. I tried following this tutorial but it ends up breaking my website and causes many errors. What I have tried: <ngb-carousel *ngIf="images"> <ng-template ngbSlide> <div class="row"> <div class="item card col-md-3" *ngFor="let image of images"> <img src="{{image.picture}}" class="card-img-top" alt="…"> <div class="card-body"> <h5 class="card-title">Card ..

Read more

import { Component, OnInit, ViewChild } from ‘@angular/core’; import {Subject} from ‘rxjs’; import {debounceTime} from ‘rxjs/operators’; import {NgbAlert} from ‘@ng-bootstrap/ng-bootstrap’; @Component({ selector: ‘app-root’, templateUrl: ‘./app.component.html’, styleUrls: [‘./app.component.css’] }) export class AppComponent implements OnInit { staticAlertClose=false; successMesage=”; private _success = new Subject<string>(); @ViewChild(‘staticAlert’, {static: false}) staticAlert: NgbAlert; @ViewChild(‘selfClosingAlert’, {static: false}) selfClosingAlert: NgbAlert; ngOnInit(): void { //throw ..

Read more

I’m trying to load config.json file from the external source/asset folder. I have created AppConfigService which loads the config data and returns the promise as expected by APP_INITIALIZER. @Injectable() export class AppConfigService { constructor(private http: HttpClient) {} loadAppConfig() { return this.http.get(‘./assets/data/config.json’) .toPromise() .then(data => { console.log(data) }); } } Here is my providers array providers: ..

Read more

I am using Angular Bootstrap in my project. I have created a table following the link (https://ng-bootstrap.github.io/#/components/table/examples). This table has sortable and searchable features. Following the example from link (https://stackblitz.com/run?file=app/table-complete.ts) I have created a table in my project. This example has a custom directive for sorting the table. The code is given below: import { ..

Read more