ng-bootstrap

how to programmatically add ngBootstrap popover to element?

拈花ヽ惹草 提交于 2019-12-20 02:28:08
问题 I am currently workingon a calendar in my angular v8 application. This is the plugin I use: https://fullcalendar.io this is the component which I include in my html template: <full-calendar defaultView="dayGridMonth" [editable]="true" [eventLimit]="5" [nowIndicator]="true" [slotLabelFormat]="timeFormat" [eventTimeFormat]="timeFormat" [eventClassName]="'fc-event-brand'" [minTime]="'08:00:00'" [maxTime]="'24:00:00'" [header]="{ left: 'prev,next today', center: 'title', right: 'dayGridMonth,

NgbTab reloading components on tab chage

陌路散爱 提交于 2019-12-20 01:09:18
问题 I have 2 tabs and inside the tab content there is a component i developed. When ever I move from one tab to another and come back to the tab on which my developed component is place, it reloads and calls its lifecycle methods called which causing problem for me. Is there a way to stop reloading the component on change of the tab. HTML code : <ngb-tabset> <ngb-tab title="xyz..." id="overview"> <ng-template ngbTabContent> ... <sd-tags [existingTags]="tags" [somethingelse]="otherstuffs" [more]=

ngbPopover with html inside

与世无争的帅哥 提交于 2019-12-19 04:51:56
问题 Is it possible to put html inside ngbPopover? Exactly, I need to put list of items. Currently I have this parameters: `ngbPopover="{{column.popup.get(row)}}" triggers="mouseenter:mouseleave" popoverTitle="{{column.popup.title | translate}}" container="body"` 回答1: Yes, but you need to use <ng-template> element like so: <ng-template #popContent>Hello, <b>{{name}}</b>!</ng-template> <button type="button" class="btn btn-secondary" [ngbPopover]="popContent" popoverTitle="Fancy content"> I've got

ngbPopover with html inside

好久不见. 提交于 2019-12-19 04:51:03
问题 Is it possible to put html inside ngbPopover? Exactly, I need to put list of items. Currently I have this parameters: `ngbPopover="{{column.popup.get(row)}}" triggers="mouseenter:mouseleave" popoverTitle="{{column.popup.title | translate}}" container="body"` 回答1: Yes, but you need to use <ng-template> element like so: <ng-template #popContent>Hello, <b>{{name}}</b>!</ng-template> <button type="button" class="btn btn-secondary" [ngbPopover]="popContent" popoverTitle="Fancy content"> I've got

How can I add bootstrap to Angular2 via system.js

主宰稳场 提交于 2019-12-18 19:32:31
问题 I'm trying to add bootstrap module to my ng2 application with by https://github.com/ng-bootstrap/ng-bootstrap. But all time getting this error: It's my index file, maybe I have some mistake in my file? index.html: <html> <head> <title>MyApplication</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">--> <link href="font-awesome/css/font

Bootstrap dropdown with Angular 6

杀马特。学长 韩版系。学妹 提交于 2019-12-18 05:14:09
问题 I'm trying to create a dropdown item in a Bootstrap navbar using Angular 6. My code is working when I test it online : <nav class="navbar bg-light navbar-light navbar-expand"> <ul class="navbar-nav"> <li class="nav-item dropdown" > <a class="nav-link dropdown-toggle" data-toggle="dropdown">Page1</a> <div class="dropdown-menu"> <a class="dropdown-item" href="#">Page1.1</a> </div> </li> <li><a class="nav-link" href="#">Page2</a></li> </ul> </nav> But the dropdown does not work with Angular 6. I

Alternative to /deep/

陌路散爱 提交于 2019-12-17 19:22:05
问题 I want to change the styles of ng bootstrap pagination component and using /deep/ links in an Angular 6 app. The following code works fine but the console is showing a warning that the code is deprecated. So, how should I change it to get rid of the warning? Here is the CSS code I am currently using: ngb-pagination /deep/ .page-item.disabled .page-link{ background: none; } ngb-pagination /deep/ .page-item.active .page-link { background-color: #223C61; &:focus, &:visited{ outline: none; box

How to programmatically close ng-bootstrap modal?

為{幸葍}努か 提交于 2019-12-17 18:16:28
问题 I've got a modal: <template #warningModal let-c="close" let-d="dismiss"> <div class="modal-header"> <button type="button" class="close" aria-label="Close" (click)="d('Cross click')"> <span aria-hidden="true">×</span> </button> <h4 class="modal-title">Warning</h4> </div> <div class="modal-body"> The numbers you have entered result in negative expenses. We will treat this as $0.00. Do you want to continue? </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" (click)

Angular Full Calendar For add ng-Bootstrap modal popup

旧街凉风 提交于 2019-12-14 04:04:18
问题 I'm used my university project for Angular Full Calendar , I want t o know how to added Calendar event for Modal popup look my image , calendar is working good, but I don't know how to add Modal popup for this event, please help me this? Thanks I want to know how to add that event to ng-bootstrap-Modal This is my code , index.component.ts export class IndexComponent { calendarOptions:Object = { height: 'parent', fixedWeekCount : false, defaultDate: '2016-09-12', editable: true, eventLimit:

Can't find a datepicker that plays nicely with angular-meteor

空扰寡人 提交于 2019-12-13 09:55:03
问题 I've tried to add a bunch of different datepicker libraries to my project: Meteor 1.7 Angular 6 Bootstrap 4 For most of the packages that are intended for Angular I get an error during import on startup. The error normally looks similar. Here is the exact error from ng-bootstrap: Uncaught Error: Can't resolve all parameters for NgbAlert: (?). In the case of that error I have not included an NgbAlert anywhere, it's solely from adding NgbModule.forRoot() so don't let the alert confuse you, the