December 2017
Beginner
372 pages
10h 32m
English
In our describe function we just have two lines of code, as follows:
let component: HomepageComponent;let fixture: ComponentFixture<HomepageComponent>;
The first one is just a definition for our Homepage component; the second line is interesting.
We create a fixture for our component and pass in the type, which, in this case, is HomepageComponent. The fixture is basically a wrapper around the component that provides additional features that we would not otherwise have if we just create an instance of the component. These features include change detection and access to the HTML elements of the component template.
Read now
Unlock full access