<div class="lessons-list" *ngIf="condition else elseTemplate">判断条件为真
</div>
<ng-template #elseTemplate><div>判断条件为假</div>
</ng-template>
​
<div class="lessons-list" *ngIf="condition then elseTemplate">判断条件为真
</div>
<ng-template #elseTemplate><div>判断条件为假</div>
</ng-template>​
<div *ngIf="contdition;then content else elseTempalte">here is ignored</div>
<ng-template #content>content here...</ng-template>
<ng-template #elseTempalte>other content here...</ng-template>

在angular中使用*ngIf else相关推荐

  1. 您需要了解有关Angular中的ng-template,ng-content,ng-container和* ngTemplateOutlet的所有信息...

    It was one of those days when I was busy working on new features for my office project. All a sudden ...

  2. 获取Angular中的AngularJS功能

    介绍 ( Introduction ) If you have solid experience with AngularJS 1.x, you're well aware of the framew ...

  3. Angular中ngCookies模块介绍

    1.Cookie介绍 Cookie总是保存在客户端中,按在客户端中的存储位置,可分为内存Cookie和硬盘Cookie.内存Cookie由浏览器维护,保存在内存中,浏览器关闭后就消失了,其存在时间是短 ...

  4. Angular 中后台前端解决方案 - Ng Alain 介绍

    Angular 中后台前端解决方案 - Ng Alain 介绍 参考文章: (1)Angular 中后台前端解决方案 - Ng Alain 介绍 (2)https://www.cnblogs.com/ ...

  5. 将选择元素绑定到Angular中的对象

    本文翻译自:Binding select element to object in Angular I'd like to bind a select element to a list of obj ...

  6. Angular 中得 scope 作用域梳理

    2019独角兽企业重金招聘Python工程师标准>>> $scope 的使用贯穿整个 Angular App 应用,它与数据模型相关联,同时也是表达式执行的上下文.有了 $scope ...

  7. 关于Angular中使用HTML的select和option标签的一些问题

    如果在Angular中使用HTML的select和option标签时,给两个标签分别绑定数据的时候,虽然可以通过[ngModel]和(ngModelChange)的形式绑定数值及选项变化后触发的事件. ...

  8. Angular 中的依赖注入link

    Angular 中的依赖注入link 依赖注入(DI)是一种重要的应用设计模式. Angular 有自己的 DI 框架,在设计应用时常会用到它,以提升它们的开发效率和模块化程度. 依赖,是当类需要执行 ...

  9. Angular中路由的嵌套-父子路由

    场景 Angular介绍.安装Angular Cli.创建Angular项目入门教程: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detail ...

最新文章

  1. 留意2021年比较热门的5种AI工作技能
  2. ONNX+TensorRT
  3. 从一个程序员的角度看——微信小应用
  4. Flash cs5 初试
  5. 完全用链表实现的贪吃蛇
  6. oracle备份能备份索引吗,ORACLE会使索引失效的条件
  7. 数据传输优化篇之:scp 或 rsync+ssh 参数优化
  8. ctypes python 结构体_Python 中 ctypes 的使用
  9. mysql中只运行一部分数据_MySQL(一)——MySQL基础和部分面试题
  10. SQL类似sleep延时语句
  11. 在 IE 中使用 Windows 窗体控件
  12. CISC 332*/CMPE 332* –Database Management Systems
  13. 黑客编程入门 之 网络编程入门
  14. 什么是a站、b站、c站、d站、e站、f站、g站、h站、i站、j站、k站、l站、m站、n站…z站?
  15. SQL中模糊查询 like使用
  16. error: Package requirements (sqlite3 > 3.7.4) were not met:
  17. win10 桌面的的文件都不见了 提示不注销保存都文件都为临时_你的电脑垃圾文件再不清理就要留到牛年了!...
  18. 数据挖掘实验-week8-关联规则挖掘(Association Rule Mining)
  19. 24时区来源,CST,CET,UTC,DST,Unix时间戳概述、关系、转换
  20. 使用 Fiddler 进行小程序抓包

热门文章

  1. android手机型号等信息
  2. 计算机网络之路由器与分组交换
  3. python获取微信用户基本信息_python批量获取微信用户资料
  4. php redis 批量删除,redis实现批量删除的命令介绍
  5. idea自动导包错误
  6. 【LaTeX 教程】06. LaTeX 插入表格
  7. CE MAPI实例讲解 --- IMAPIAdviseSink的一个例子(四)
  8. linux 下python进程查看及关闭
  9. 写给开发者:别让他人用你的App赚钱[转]
  10. android 各个版本特性