ngx-bootstrap

how to collapse with ngx-bootstrap angular without a flag

拈花ヽ惹草 提交于 2020-12-12 08:30:13
问题 i am trying to do a collapse animation, but without the boolean indicator isCollapsed , because i have a lot of elements and i don´t want to make a lot of booleans, there is a way to do that without a boolean indicator? <button type="button" class="btn btn-primary" (click)="isCollapsed = !isCollapsed" [attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic">Toggle collapse </button> <hr> <div id="collapseBasic" [collapse]="isCollapsed"> <div class="well well-lg card card-block card

how to collapse with ngx-bootstrap angular without a flag

房东的猫 提交于 2020-12-12 08:25:45
问题 i am trying to do a collapse animation, but without the boolean indicator isCollapsed , because i have a lot of elements and i don´t want to make a lot of booleans, there is a way to do that without a boolean indicator? <button type="button" class="btn btn-primary" (click)="isCollapsed = !isCollapsed" [attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic">Toggle collapse </button> <hr> <div id="collapseBasic" [collapse]="isCollapsed"> <div class="well well-lg card card-block card

angular4项目中引入ngx-bootstrap模块步骤

半世苍凉 提交于 2020-02-03 13:00:42
1、引入ngx-bootstrap npm install ngx-bootstrap -save 用cnpm的把npm改为cnpm即可,这时你会发现在你的package.json中包含有ngx-bootstrap,此时引入成功,但是此时只是引入了逻辑文件,bootstrap的样式需要自己引入全局文件中 2、引入bootstrap的css文件 在index.html文件中引入即可(要保证你的bootstrap文件在assets下。在angular6中,一般json放在assets下,放在其他文件夹下会找不到) <link rel= "stylesheet" href= "assets/bootstrap-v3.3.7/bootstrap.min.css" > 3、在模块中的应用 官方网站要求把引入的用到的module引入到app.module.ts中,但是引入以后不属于根模块的组件还是用不了引入的bootstrap(此时我要用到bootstrap的分页功能)。所以,我在相应组件的模块下进行了引入,此时可以正常使用bootstrap分页功能了。 ———————————————— 版权声明:本文为CSDN博主「天黑,请闭眼」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/weixin

Angular Carousel using ngx-bootstrap

老子叫甜甜 提交于 2020-01-26 03:50:07
问题 I have followed the Getting started guide using angular-cli and I had a complete demo using the Alert module. I have then tried to add a Carousel as described here. I don't have errors in the console, but the display looks wired and the Carousel is not functioning. This is how it looks The arrows work but the caption goes outside the image, a block of white to the right of the image. I have copy-pasted the component code as well as the HTML, and I tried the first two examples on the above

Angular 5 ngx-bootstrap form validation

不打扰是莪最后的温柔 提交于 2020-01-01 09:57:08
问题 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';

Angular 5 ngx-bootstrap form validation

喜你入骨 提交于 2020-01-01 09:56:14
问题 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';

ngx-bootstrap How to open a modal from another component?

余生颓废 提交于 2019-12-30 17:26:53
问题 What I'm trying to do is open a modal from another component, however I keep getting this error TypeError: Cannot create property 'validator' on string 'test1' when component1.html loads because childModal is included. How can I get rid of these errors and implement this properly? component1.html <button type="button" class="btn btn-outline-primary btn-lg" (click)="modal.showModal()">Test ...... <child-modal #childModal ></child-modal> component1.ts @ViewChild('childModal') childModal: