ngx-bootstrap

How to dynamically apply a tooltip to part of an element's dynamic text content in Angular?

会有一股神秘感。 提交于 2021-02-11 09:45:01
问题 So I have this json file containing a dictionary. definitions.json { "word": "Some definition.", "an expression": "Some other definition." } And I have components throughout my app that may be similar to this. my.component.ts @Component({ selector: 'my', template: ` <h1>{{ someTitleText }}</h1> <p>{{ someText }}</p> ` }) export class MyComponent { @Input() someTitleText: string; @Input() myText: string; } I want to display a tooltip when the user will hover over a word that is present in the

Open a Modal Using an Option from a Dropdown - Angular 2 + ngx

泄露秘密 提交于 2021-02-10 11:58:25
问题 Using ngx-bootstrap (4) with Angular 2/CLI. Trying to use a dropdown list to select which modal to open. The modal currently works fine if I just have a button for each modal (not a dropdown), but the requirements call for a dropdown. I tried something like <select class="detailsOption" (change)="openModal($event.target.value)"> <option value="">Select Option</option> <option value={{modal1}} >Option 1</option> <option value={{modal2}}>Option 2</option> </select> <ng-template #modal1> </ng

Open a Modal Using an Option from a Dropdown - Angular 2 + ngx

早过忘川 提交于 2021-02-10 11:58:14
问题 Using ngx-bootstrap (4) with Angular 2/CLI. Trying to use a dropdown list to select which modal to open. The modal currently works fine if I just have a button for each modal (not a dropdown), but the requirements call for a dropdown. I tried something like <select class="detailsOption" (change)="openModal($event.target.value)"> <option value="">Select Option</option> <option value={{modal1}} >Option 1</option> <option value={{modal2}}>Option 2</option> </select> <ng-template #modal1> </ng

Open a Modal Using an Option from a Dropdown - Angular 2 + ngx

怎甘沉沦 提交于 2021-02-10 11:57:49
问题 Using ngx-bootstrap (4) with Angular 2/CLI. Trying to use a dropdown list to select which modal to open. The modal currently works fine if I just have a button for each modal (not a dropdown), but the requirements call for a dropdown. I tried something like <select class="detailsOption" (change)="openModal($event.target.value)"> <option value="">Select Option</option> <option value={{modal1}} >Option 1</option> <option value={{modal2}}>Option 2</option> </select> <ng-template #modal1> </ng

Open a Modal Using an Option from a Dropdown - Angular 2 + ngx

不羁岁月 提交于 2021-02-10 11:57:09
问题 Using ngx-bootstrap (4) with Angular 2/CLI. Trying to use a dropdown list to select which modal to open. The modal currently works fine if I just have a button for each modal (not a dropdown), but the requirements call for a dropdown. I tried something like <select class="detailsOption" (change)="openModal($event.target.value)"> <option value="">Select Option</option> <option value={{modal1}} >Option 1</option> <option value={{modal2}}>Option 2</option> </select> <ng-template #modal1> </ng

ERROR TypeError: Cannot read property 'createText' of null in ngx-bootstrap with angular 6

混江龙づ霸主 提交于 2021-02-07 18:42:44
问题 I want to open ngx-bootstrap modal from a different component using @ViewChild in angular 6 but I am getting this error. ERROR TypeError: Cannot read property 'createText' of null at ComponentLoader.push../node_modules/ngx-bootstrap/component-loader/component-loader.class.js.ComponentLoader._getContentRef And in in Inspect Element this tag is also visible <bs-modal-backdrop class="modal-backdrop fade in"></bs-modal-backdrop> 回答1: You can use the selector to call other component on a modal in

Upgrading ngx-bootstrap 3.0.1 to 4.0.1

怎甘沉沦 提交于 2021-02-07 18:11:35
问题 While Upgrading from ngx bootstrap 3.0.1 to 4.0.1 am getting the following error.Replaced the node_modules, package.json still getting the same errors. Angular Version : Angular 6, Typescript: 2.7.2. Errors: ERROR in node_modules/ngx-bootstrap/chronos/utils/type-checks.d.ts(8,62): error TS2304: Cannot find name 'Extract'. node_modules/ngx-bootstrap/datepicker/reducer/bs-datepicker.actions.d.ts(5,33): error TS1039: Initializers are not allowed in ambient contexts. node_modules/ngx-bootstrap

Upgrading ngx-bootstrap 3.0.1 to 4.0.1

倾然丶 夕夏残阳落幕 提交于 2021-02-07 18:07:34
问题 While Upgrading from ngx bootstrap 3.0.1 to 4.0.1 am getting the following error.Replaced the node_modules, package.json still getting the same errors. Angular Version : Angular 6, Typescript: 2.7.2. Errors: ERROR in node_modules/ngx-bootstrap/chronos/utils/type-checks.d.ts(8,62): error TS2304: Cannot find name 'Extract'. node_modules/ngx-bootstrap/datepicker/reducer/bs-datepicker.actions.d.ts(5,33): error TS1039: Initializers are not allowed in ambient contexts. node_modules/ngx-bootstrap

Way to add custom class when using ngx-bootstrap modalService

不羁岁月 提交于 2021-02-06 02:37:44
问题 When looking to the ngx-bootstrap source code here: modal-options.class.ts There is an optional class property defined as class?: string; . What is the way to use it ? Is it possible to add a custom class like: this.modalService.config.class = 'myClass'; Before using the servive as for example: this.modalRef = this.modalService.show(template, { animated: false }); This way, I think we can add custom CSS to the displayed modal I've tried to add a custom class without success. That class

Way to add custom class when using ngx-bootstrap modalService

老子叫甜甜 提交于 2021-02-06 02:34:55
问题 When looking to the ngx-bootstrap source code here: modal-options.class.ts There is an optional class property defined as class?: string; . What is the way to use it ? Is it possible to add a custom class like: this.modalService.config.class = 'myClass'; Before using the servive as for example: this.modalRef = this.modalService.show(template, { animated: false }); This way, I think we can add custom CSS to the displayed modal I've tried to add a custom class without success. That class