programing

정의되지 않은 'visitExpression' 속성을 읽을 수 없습니다.

sourcejob 2023. 8. 7. 22:30
반응형

정의되지 않은 'visitExpression' 속성을 읽을 수 없습니다.

시작 지점에 있는 제 각진 앱에서 다음과 같은 오류가 발생했습니다.

속성을 읽을 수 없습니다.visitExpressionundefined

무엇이 문제일까요?

제 경우에는, 중복된 것입니다.,의 Routes 배열app.routing.ts.

사용할 수 있습니다.,[\s]*,경로에서 찾기 위한 정규식 검색 쿼리로, 두 쉼표 사이에 공백(0에서 여러 개)이 있는 경우 이를 찾습니다.

제 경우 app.module.ts 파일의 ','였습니다.

imports: [
    BrowserModule,
    **AppRoutingModule,,**
    HttpClientModule,

다음으로 변경:

imports: [
    BrowserModule,
    **AppRoutingModule,**
    HttpClientModule,

제 경우에는 선택기가 비어 있는 구성 요소였습니다.

나에게 그것은, , 그것은,*-routing.module.ts

   path: 'shoplist',
    children: [
      {
        path: '',
        loadChildren: () => import('../shoplist/shoplist.module').then(m => m.ShoplistModule)
      }
    ]
  },, <------------------ this was the cause
  {
    path: 'notification',
    children: [
      {
        path: '',
        loadChildren: () => import('../notification/notification.module').then(m => m.NotificationModule)
      }
    ]
  },

글로벌 검색 및 대체 작업을 수행했습니다.,[\s]*,그리고 그것을 대체했습니다.,이중 쉼표가 다른 여러 모듈 가져오기에서 발견되어 앱을 손상시켰습니다.

내 경우에는 그것이 실종된 것이었습니다.}파이프 뒤, 매트 탭 내의 '슬립' ng-pair 내:

<mat-tab [label]="'PHOTOS' | transloco">
  <div *ngIf="images.length; else noPhoto">
    ...
  </div>
  <ng-template #noPhoto>
    <div>
      {{ "NO_PHOTOS" | transloco } <------------------ this was the cause
    </div>
  </ng-template>
</mat-tab>

언급URL : https://stackoverflow.com/questions/39936819/cannot-read-property-visitexpression-of-undefined

반응형