Angular2を使用していますが、ユーザがWindows 7上でIE11を使用してページに移動したときに問題が発生した唯一の組み合わせであると思われるため、テキストボックス/テキストエリアに情報を入力できません。ドロップダウンは、チェックボックスと同様に機能します(必要に応じて追加フィールドを表示/非表示にしますが、新しいテキストフィールドに情報を入力することはできません)。Angular2は入力フィールドにテキストを入力できません
ユーザーが[送信]ボタンをクリックすると、必要なすべてのフィールドが必要な入力として表示され、ユーザーは情報を入力できます。
重要であれば、ユーザーはRECAPTCHA情報を入力した後、このページにリダイレクトされます。私がアプリのルーティングモジュールから「canActivate」を取り出したら、それは機能します。
ここでここでキャプチャコード
import { Component } from '@angular/core';
import {
Router,
NavigationExtras
} from '@angular/router';
import { CaptchaService } from '../../utils/captchaguard/captcha.service';
import { ReCaptchaComponent } from 'angular2-recaptcha/lib/captcha.component';
@Component({
moduleId: module.id,
templateUrl: 'captcha.component.html'
})
export class CaptchaComponent {
message: string;
constructor(
public captchaService: CaptchaService,
public router: Router) {
//this.captchaService.isLoggedIn = true; //Uncomment out for testing
this.captchaService.isLoggedIn = false; //Uncomment out for live
}
handleCorrectCaptcha(userResponseKey: any) {
let redirect = this.captchaService.redirectUrl ? this.captchaService.redirectUrl : '/admin';
let redirectParts = redirect.split('/');
let appendID = redirect[redirect.length - 1];
//let appendID = 0;
this.captchaService.isLoggedIn = true;
//this.router.navigate(['/studyfd' + appendID]);
this.router.navigateByUrl('/studyfd' + appendID);
//this.router.navigate(['/studytest/0']);
}
}
が質問にページを生成するHTMLの一部です:
<!-- First and Last Name -->
<div class="row">
<div class="col-sm-6">
First Name, Last Name
</div>
<div class="col-sm-3">
<input type="text" name="FirstName" id="firstname" required="required"
placeholder="First Name" class="required "
[(ngModel)]="user.FirstName" *ngIf="!readonly" />
<label *ngIf="readonly">{{user.FirstName}}</label>
</div>
<div class="col-sm-3">
<input type="text" name="LastName" id="lastName" required="required"
placeholder="Last Name" [(ngModel)]="user.LastName" *ngIf="!readonly"
class="required " />
<label *ngIf="readonly">{{user.LastName}}</label>
</div>
</div>
コードはどのように見えるのですか? –
より多くのソースコード情報を提供してください。 –
エントリが使用されたコードの一部で更新されました。他のコードが役に立つと思ったら教えてください。参照されるCaptcha.serviceは、単にredirectUrl変数を格納するために使用されます。もう一度、Windows 8、Windows 10、Mac OS 10、Windows 7のChromeとFirefoxでテストしましたが、Windows 7には問題があるIE 11しかありません。助けてくれてありがとう –