mean-stack-angular6-crud-example icon indicating copy to clipboard operation
mean-stack-angular6-crud-example copied to clipboard

Fixed `ng test` failed tests, due to errors:

Open alundiak opened this issue 5 years ago • 1 comments

  • "If 'router-outlet' is an Angular component, then verify that it is part of this module"
  • "If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas'"
  • "Error: StaticInjectorError(DynamicTestModule)[ApiService -> HttpClient]"
  • "StaticInjectorError(DynamicTestModule)[HttpClient -> HttpHandler]"
  • "Can't bind to 'routerLink' since it isn't a known property of 'a'"
  • "Can't bind to 'formGroup' since it isn't a known property of 'form'"
  • "Can't bind to 'errorStateMatcher' since it isn't a known property of 'input'"
  • "Can't bind to 'dataSource' since it isn't a known property of 'table'"
  • "Error: StaticInjectorError(DynamicTestModule)[RouterLinkWithHref -> Router]"
  • "No provider for ControlContainer"

Those errors were faced during ng test, and fixed step by step for every it(). Code changes verified with:

  • Node v10.8.0,
  • npm v6.2.0,
  • Angular Core v6.0.2,
  • Angular Material v6.0.2,
  • Angular Forms v6.0.2 and
  • Angualr CLI v6.0.0 (also with globally installed Angular CLI 6.1.2)
  • Also tested code with Angular v6.1.1 but I will create separate PR for that changes.

Related to issue #5

screen shot 2018-08-05 at 15 48 29

alundiak avatar Aug 05 '18 15:08 alundiak

up :)

alundiak avatar May 06 '21 07:05 alundiak