我已经使用Ionic 4创建了Application,并且将routerDirection添加到了div
<div class="finger-print-content" (click)="loginUsingFingerprint()" [routerDirection]="'forward'">
<img class="fingerprint-btn-img" src="assets/images/fingerprint.png">
<p class="fingerprint-btn-text" translate>SIGN_IN_USING_FINGERPRINT</p>
</div>
</div>
运行ionic serve
时一切正常,我在浏览器中提供应用程序,但是当我需要运行单元测试ng test
时,我看到了该错误。
Can't bind to 'routerDirection' since it isn't a known property of 'div'
答案 0 :(得分:1)
我认为语法应为
<div routerLink='/route' routerDirection='forward'>
与
相同this.navCtlr.goRoot('/route');