Angular5 업그레이드 후 오류가 보고되었습니다.

php中世界最好的语言
풀어 주다: 2018-06-09 11:20:01
원래의
1469명이 탐색했습니다.

이번에는 Angular5 업그레이드 후 보고된 오류에 대해 알려드리겠습니다. Angular5 업그레이드 후 보고된 오류에 대한 주의 사항은 무엇입니까? 다음은 실제 사례입니다.

머리말

RxJS는 RxJS를 어떻게 설명하든 관계없이 반응형 확장 프로그래밍을 위한 도구입니다. Angular는 비동기식 제어가 가능하고 더 간단하게 만들기 위해 RxJS를 도입했습니다. 하지만 최근 업그레이드 중에 몇 가지 문제가 발생했습니다. 이를 소개하고 이 문제가 발생한 친구에게 몇 가지 참고 사항을 제공하겠습니다. 자세한 내용은 아래에서 살펴보겠습니다.

Angular 5.0.5는 RxJS를 5.5.3으로 업그레이드하고 오류를 보고했습니다.

ERROR Error: Uncaught (in promise): EmptyError: no elements in sequence
EmptyError: no elements in sequence
 at new EmptyError (EmptyError.js:28)
 at FirstSubscriber._complete (first.js:154)
 at FirstSubscriber.Subscriber.complete (Subscriber.js:122)
 at MergeMapSubscriber._complete (mergeMap.js:150)
 at MergeMapSubscriber.Subscriber.complete (Subscriber.js:122)
 at MapSubscriber.Subscriber._complete (Subscriber.js:140)
 at MapSubscriber.Subscriber.complete (Subscriber.js:122)
 at EmptyObservable._subscribe (EmptyObservable.js:83)
 at EmptyObservable.Observable._trySubscribe (Observable.js:172)
 at EmptyObservable.Observable.subscribe (Observable.js:160)
 at new EmptyError (EmptyError.js:28)
 at FirstSubscriber._complete (first.js:154)
 at FirstSubscriber.Subscriber.complete (Subscriber.js:122)
 at MergeMapSubscriber._complete (mergeMap.js:150)
 at MergeMapSubscriber.Subscriber.complete (Subscriber.js:122)
 at MapSubscriber.Subscriber._complete (Subscriber.js:140)
 at MapSubscriber.Subscriber.complete (Subscriber.js:122)
 at EmptyObservable._subscribe (EmptyObservable.js:83)
 at EmptyObservable.Observable._trySubscribe (Observable.js:172)
 at EmptyObservable.Observable.subscribe (Observable.js:160)
 at resolvePromise (zone.js:824)
로그인 후 복사

이는 RxJS 업그레이드로 인해 발생하는 문제입니다. 문제를 참조하세요.

메서드 1

모든 경로에 pathMath: "full"을 추가합니다. 예를 들어

const routes: Routes = [
 { path: "", component: IndexComponent },
 { path: "home", component: HomeComponent },
 { path: "about", component: AboutComponent },
 ...
];
로그인 후 복사

const routes: Routes = [
 { pathMatch: 'full', path: "", component: IndexComponent },
 { pathMatch: 'full', path: "home", component: HomeComponent },
 { pathMatch: 'full', path: "about", component: AboutComponent },
 ...
];
로그인 후 복사

로 변경되었습니다. 2

RxJS는 버전 5.5로 다운그레이드되었습니다. 2.

참고: 다운그레이드 시 이전 버전을 제거해야 합니다.

이 기사의 사례를 읽은 후 방법을 마스터했다고 생각합니다. 더 흥미로운 정보를 보려면 PHP 중국어 웹사이트의 다른 관련 기사를 주목하세요!

추천 도서:

React, Redux, React-Redux 사용하기

실제 프로젝트에서 Vue 컴포넌트를 사용하는 방법

위 내용은 Angular5 업그레이드 후 오류가 보고되었습니다.의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!