首页 > 其他分享 >ng-boostrap 介绍

ng-boostrap 介绍

时间:2024-04-25 22:34:57浏览次数:19  
标签:模态 boostrap NgbActiveModal component 介绍 ng result modal 组件

modal

NgbActiveModal 链接

Class

A reference to the currently opened (active) modal.

对当前打开的(active)modal 的引用,(就是现实的内容)。

Instances of this class can be injected into your component passed as modal content. So you can .update().close() or .dismiss() the modal window from your component.

此类的实例可以注入到作为模态内容传递的组件中。所以你可以 .update() , .close() 或者 .dismiss() 从你的组件的模态窗口。

Methods

update
since 14.2.0
update(options: NgbModalUpdatableOptions) => void
Updates options of an opened modal.
更新打开的模式的选项。
close
close(result: any) => void
使用可选 result 值关闭模态。
The NgbModalRef.result promise will be resolved with the provided value.
NgbModalRef.result承诺将使用提供的值进行解析。
dismiss
dismiss(reason: any) => void
Dismisses the modal with an optional reason value.
关闭具有可选 reason 值的模态。
The NgbModalRef.result promise will be rejected with the provided value.
NgbModalRef.result 承诺将被拒绝,并提供的价值。

NgbModal  链接

Service 服务

A service for opening modal windows.
用于打开模态窗口的服务。

Creating a modal is straightforward: create a component or a template and pass it as an argument to the .open() method.
创建模态非常简单:创建一个组件或模板,并将其作为参数传递给 .open() 方法。

Properties 性能

activeInstances Returns an observable that holds the active modal instances.
返回保存活动模态实例的可观察对象。

Type: EventEmitter<NgbModalRef[]> 类型: EventEmitter<NgbModalRef[]>

Methods 方法

open open(content: any, options: NgbModalOptions) => NgbModalRef

Opens a new modal window with the specified content and supplied options.
打开包含指定内容和提供选项的新模式窗口。
Content can be provided as a TemplateRef or a component type. If you pass a component type as content,
then instances of those components can be injected with an instance of the NgbActiveModal class.
You can then use NgbActiveModal methods to close / dismiss modals from "inside" of your component.
内容可以作为 TemplateRef 组件类型或组件类型提供。
如果将组件类型作为内容传递,则可以将这些组件的实例注入 NgbActiveModal 到类的实例中。
然后, NgbActiveModal 您可以使用方法从组件的“内部”关闭/关闭模态。

Also see the NgbModalOptions for the list of supported options.
NgbModalOptions 另请参阅支持的选项列表。
dismissAll
since 3.1.0 从 3.1.0 开始
dismissAll(reason: any) => void 
Dismisses all currently displayed modal windows with the supplied reason.
关闭所有当前显示的模式窗口,并提供原因。
hasOpenModals
since 3.3.0 从 3.3.0 开始
hasOpenModals() => boolean 
Indicates if there are currently any open modal windows in the application.
指示应用程序中当前是否有任何打开的模式窗口。

标签:模态,boostrap,NgbActiveModal,component,介绍,ng,result,modal,组件
From: https://www.cnblogs.com/tangge/p/18158764

相关文章

  • Sping-IOC理论推导
    2、IOC理论推导2.1IOC原型使用原来的方式实现第一步:编写UseDAO接口packagedao;publicinterfaceUseDao{voidgetUser();}第二步:编写UseDao的实现类//实现类一packagedao;publicclassUserDaoImplimplementsUseDao{@Overridepublicvo......
  • 论文笔记-Non-intrusive classification of gas-liquid flow regimes in an S-shaped
    目标:使用深度神经网络对S形立管中的流态进行分类该分类器与四种传统的机器学习分类器进行了比较:即AdaBoost分类器、bagging分类器、额外树分类器和决策树分类器小波分析在流态分类中的应用可以有效地提取多相流行为的特征。使用信号处理方法进行流态分类,包括峰值点计数、......
  • 图文结合手把手教你创建SpringCloud项目
    前言什么是SpringCloud?SpringCloud是一系列框架的有序集合,它利用SpringBoot的开发便利性简化了分布式系统的开发,比如服务注册、服务发现、网关、路由、链路追踪等。SpringCloud并不是重复造轮子,而是将市面上开发得比较好的模块集成进去,进行封装,从而减少了各模块的开发成......
  • IDEA中springboot项目编译两次的问题
    原因:因为在导入项目的之后,项目无法运行,问题1:显示缺少org.springbootframe的依赖,不知道怎么解决,网上搜了个方法,就是勾选下图的选项,意思是把build操作由IDEA交给Maven,勾选之后确实可以启动项目了但是后面在执行Mybatis时,问题2:我发现无论如何都会报一个唯一键值重复的错误,思考原因......
  • [题解][2021浙江CCPC] String Freshman
    题目描述有一份错误的字符串匹配算法,计算S串里有几个T串(只要有一个元素不同,则视为不同的串)。现在输入T串,判断能否构造S串让该算法不通过。intFind_Answer(){intj=1,ans=0;for(inti=1;i<=n;i++){if(S[i]!=T[j])j=1;if(S[......
  • Springboot版本升级
    升级简介开发软件:IDEA2019项目环境:java8,springboot2.0.5目标版本:java8,springboot2.5.5本文档前后变化对比,旧代码使用、//等表示。依赖升级升级版本<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <!......
  • springboot的日志swagger的配置
    我们导入swagger分为三步一.导入依赖首先我们需要在项目的pom里导入依赖<dependency><groupId>com.github.xiaoymin</groupId><artifactId>knife4j-spring-boot-starter</artifactId><version>3.0......
  • 4 25spring Task
    由spring框架提供的定时处理任务的 websocket:使得客户端浏览器跟服务端双向传递数据    ......
  • 【vue-入门】-【1】Vue介绍与项目结构
    Vue是什么?渐进式javaScript框架,易学易用,性能出色,适用场景丰富的web框架官方文档地址:https://cn.vuejs.orgVue简介是渐进式javascript框架,易学易用,性能出色,适用场景丰富的web前端框架Vue是一款用于构建用户节点的javascript框架。它基于标准html、css、javascript构建并提......
  • 论文笔记-Machine learning based flow regime recognition in helically coiled tube
    对象:进行了螺旋线圈中的自动两相流模式识别方法:X射线照相的空隙率测量数据+聚类+KNN、RF、SVM目标:模式识别关注特征:结果:聚类分类:模型是随机森林(RF)分类器、KNN分类器和SVM(参见第1节)。为了优化超参数并估计分类器精度,所有模型均采用嵌套5×5交叉验证方案,如图1所示。......