腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
带有
as
语法
和
&&
运算符
的
ngIf
angular
如何将
ngIf
as
语法
与&&
运算符
结合使用?下面的代码会导致“期望
的
标识符或关键字”错误 <control-error *
ngIf
="(createUserError | async as userError) && submitted">
浏览 10
提问于2021-11-14
得票数 1
回答已采纳
2
回答
带as关键字
的
Angular async管道
的
正确
语法
angular
<ng-container *
ngIf
="searchResultLength$ | async as srl"></ng-container> 但是,如果我想拥有其他类型
的
逻辑
运算符
,
语法
是什么?我想做
的
是: <ng-container *
ngIf
="(searchResultLength$ | async as srl) > 2">
浏览 38
提问于2020-04-01
得票数 0
回答已采纳
3
回答
不能在*
ngIF
中使用*
ngIF
Can: angular2
json
、
typescript
、
angular
、
angular2-directives
、
angular2-services
我正在使用angular2,并且我从一个服务绑定数据,问题是当我加载数据时,我应该按id过滤它,这就是我应该做
的
: *ngFor="#item of items_list" value="{{item.value}}" class="{{item.class}}" checked="{{item.checked"}, { "
浏览 0
提问于2016-03-24
得票数 6
回答已采纳
1
回答
使用
带有
"||“
运算符
的
异步管道不能正常工作
angular
、
async-pipe
我想使用
带有
"||“
运算符
的
异步管道,但我不知道如何使用。例如: <div class="col-md-12" *
ngIf
="(someSubscription$ | async) as users || someCondition">
浏览 25
提问于2020-03-24
得票数 1
3
回答
angular -在observable<Object>上使用异步管道,并将其绑定到html中
的
局部变量
angular
、
typescript
、
pipe
、
local-variables
、
angular2-observables
您好,我有一个可观察
的
用户$,它有很多属性(姓名、头衔、地址...) user$:Observerable<User>; constructor(private userService
浏览 1
提问于2017-04-10
得票数 52
回答已采纳
2
回答
错误长度:无法读取未定义角度4
的
属性‘TypeError’(不是重复
的
)
angular
LeaderBoardComponent.html:27 ERROR TypeError: Cannot read property 'length' of undefined<div *
ngIf
) }hello 1 <div *
ngIf
浏览 0
提问于2017-08-19
得票数 0
3
回答
我收到了表格验证
的
错误。我可以在控制台中访问errors.minlength,但不能在模板中访问
html
、
angular
、
validation
ngClass]="{visible: last_name.touched && last_name.invalid}" class="message"> <div *
ngIf
浏览 0
提问于2021-11-13
得票数 0
2
回答
*
ngIf
和
*
ngIf
在角为5
的
<tr>元素上
angular5
、
ngfor
、
angular-ng-if
在我
的
角5应用程序中,我循环创建tr元素:但我只想在符合某些条件
的
情况下显示这一行。我知道我不能在一起使用*ngFor
和
*
ngIf
,但我不知道如何解决这个问题。<tr *ngFor="let elem
浏览 1
提问于2018-02-06
得票数 2
回答已采纳
1
回答
解析运行时Javascript属性
的
类型抄本编译器消息
javascript
、
angular
、
typescript
我有一段代码如下: <ng-container *
ngIf
="email.invalidclass="validation-error-message" *
ngIf
="pwd.errors.required">Password is required.</div>
浏览 1
提问于2019-02-11
得票数 1
回答已采纳
3
回答
无法读取未定义角度可观测值
的
属性“名字”。firstname被定义为
angular
我将输入标记
的
值绑定到ngmodel。input type="text" id="Fname" value="{{getProfile.firstname}}" placeholder="FirstName" #FirstName/>我也用ngFor指令做了同样
的
事情。但它并不适用于常规
的
输入值。 如何将概
浏览 0
提问于2018-11-10
得票数 0
2
回答
模板中
的
离子/角度检查值(如果设置)
angular
、
typescript
、
ionic-framework
谁可以检查我
的
数组中
的
url值是否已设置?
浏览 4
提问于2017-12-19
得票数 0
回答已采纳
4
回答
在angular2中ng-if
和
*ng-if有什么区别?
javascript
、
angular
、
angular-ng-if
我试图理解ng-if
和
*ng-if之间
的
区别,但在我看来它们是一样
的
。 有什么不同,我应该记住,选择一个而不是另一个,以及何时使用这些指令?
浏览 6
提问于2016-07-08
得票数 38
回答已采纳
2
回答
不能将formGroupName设置为空
angular
、
angular-reactive-forms
我试图用RxFormBuilder (角13.x)创建一个动态
的
角形式。如果我
的
输入不属于嵌套字段,我想将formGroupName设置为null,否则设置它。如果设置为null,我希望删除这些属性,但最后得到了下面的错误:这里有一个简单
的
例子来说明_formBuilder.formGroup(A, this.model);} <form [formGroup]="form&q
浏览 21
提问于2022-09-14
得票数 1
1
回答
带有
"as“
的
ngIf
和
其他
html
、
angular
如何使用"as“
语法
和
其他块拥有一个
ngIf
?<div class="customer-form-container" *
ngIf
="(customer$ | async) as customer; else elseBlock"> <div class
浏览 1
提问于2021-12-13
得票数 0
回答已采纳
1
回答
在模板内检查角度省道
的
异步空值
angular-dart
在typescript angular中,看起来你可以去:<div *
ngIf
="club | async as club"> </div>,但是'as‘操作符在dart中不起作用。我尝试过这样
的
东西:<div *
ngIf
="(club | async) != null"> </div> 我也试图做一个绑定
的
模板变量,但
语法
似乎也有问题。realclub="club | asyn
浏览 2
提问于2018-09-07
得票数 0
11
回答
如何使用"*
ngIf
else"?
angular
、
if-statement
、
angular-template
我正在使用Angular,并且我想在这个示例中使用*
ngIf
else (从版本4开始提供): content here ...</div> other content here...如何使用
ngIf
else实现相同
的
行为?
浏览 127
提问于2017-03-25
得票数 816
回答已采纳
2
回答
反应性表单如何一次显示一个错误消息?
javascript
、
angular
、
typescript
、
angular-reactive-forms
、
angular7
._]+@company(.com|.go|.jet)')]],<label for="email" class="error-msg" *
ngIf
="authForm.gethasError('email') && hideFocus">Your email is invalid</label> <label for="email" class="error-
浏览 0
提问于2018-11-07
得票数 2
3
回答
使用异步管道在单个
ngIf
上组合两个或多个(布尔型)观察值
angular
、
rxjs
、
angular-template
没有可观察性,我可以在HTML模板中编写以下代码行:<div *
ngIf
="{ a: myVarA | async, b: myVarB | async } as result"></div> 但是,我看不到在用于计算
ngIf
的
表达式
浏览 2
提问于2017-09-07
得票数 15
回答已采纳
2
回答
Angular:单击2个不同
的
组件时显示1个组件
angular
、
typescript
我有3个独立
的
组件Comp2单击Comp1,会显示Comp2,为了实现此显示/隐藏功能,我在Comp2上使用了*
ngIf
。现在我也想展示Comp3
的
Comp2 onclick,我知道我可以用*
ngIf
来实现这一点。但是Comp2已经有来自Comp1
的
*
ngIf
,所以除非Comp1没有发送任何标志,否则Comp2将不可见,即使我试图显示来自Comp3
的
Comp2。这个问题
的
解决方案是使用
带有
||<e
浏览 4
提问于2018-05-23
得票数 0
1
回答
为什么Quartus对我
的
if-语句抛出一个错误?
vhdl
这也许是个愚蠢
的
问题,但这个过程有什么问题呢?错误(10500):VHDL
语法
错误在invent_a_chip.vhdl(132)附近
的
文本“‘;>预期"(",或一个标识符,或一元
运算符
”) signal count , count_nxt : unsigned(2
浏览 0
提问于2019-05-09
得票数 0
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
python教程:“/”运算符和“//”运算符的区别
Java 的方法和运算符
Twitter 推出带有缺陷和限制的加密 DM 功能
从属性到结构,带你深入理解 Angular2 两大类型指令!
Python语法系列(6)-break和continue的用法
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
云直播
活动推荐
运营活动
广告
关闭
领券