eSignAndRegistration: boolean;
registration: boolean;
esign: boolean;
css: boolean;
ngOnInit(): void {
if (this.activatedRoute.snapshot.queryParamMap.has('registration')) {
this.registration = true;
} else if (this.activatedRoute.snapshot.queryParamMap.has('esign®istration')) {
this.eSignAndRegistration = true;
} else if (this.activatedRoute.snapshot.queryParamMap.has('esign')) {
this.esign = true;
} else if (this.activatedRoute.snapshot.queryParamMap.has('css')) {
this.css = true;
}
}
为什么“&”符号会这样做?如何使用“esign®istration”使布尔值“esignandregistration”为真。
1条答案
按热度按时间ebdffaop1#
我在if语句中添加了多个条件,使其正常工作: