cd slides
npm install
npm start
http://localhost:8081/
https://github.com/rangle/angular-ngrx-example/
Using Angular 4.0.0
cd exercises
yarn
or npm install
npm run ex1
npm test ex1
Code for exercise is in ex1/app/landing-page
.
To modify backend data, stop the app edit mock-api/database.json
and restart.
For the solution replace "ex1" with "ex1-sol".
Configure test module: `import { configureTestModule } from './test/configure-test-module.function';
// usage:
beforeEach(configureTestModule({
imports: [],
declarations: []
providers: [],
}));
Wrappers: `import {TestComponentSupport} from './test/test-component-support.class'
// usage:
let support:TestComponentSupport<MyComponent> = new TestComponentSupport(MyComponent);
public API:
component
TypeT
(an instance of your component)detectChanges()
Runs change detection on your component.update()
RunsngOnChanges
on your component, if available.whenStable()
Same as Fixture method of same name.querySelector(selector: string): any
Retuns an HTMLElement. Could probably bequerySelector(selector: string): HTMLElement
querySelectorAll(selector: string): any[]
getAttributeValue(selector: string, attributeName: string)
getStyle(selector: string)
getClassNames(selector: string)
getInnerHtml(selector: string)