Skip to content

Instantly share code, notes, and snippets.

Christian Lüdemann lydemann

Block or report user

Report or block lydemann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View todo-list.service.spec
import { TestBed } from '@angular/core/testing';
import { Store } from '@ngrx/store';
import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { first } from 'rxjs/operators';
import { TodoListService } from '@app/core/todo-list/todo-list.service';
import { TODOItem } from '@app/shared/models/todo-item';
import { TodoListState } from './redux-api/todo-list.model';
describe('Service: TodoList', () => {
View .lintstagedrc
{
"*.{ts,json,md,scss,html}": [
"prettier --write",
"git add"
],
"*.ts": [
"tslint --fix",
"git add"
],
"*.scss": [
View commitlint.config.js
module.exports = {
extends: ["@commitlint/config-conventional"]
};
View angular.json
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
}
View app.module.ts
LoadableModule.forRoot({ fileMappings: lazyLoadingConfig }),
View lazy-loading.config.ts
export const lazyLoadingConfig = {
footer: 'src/app/footer/footer.module#FooterModule'
};
View app.component.html
<div>
<!-- Navigation bar -->
<app-navbar></app-navbar>
<!-- Router outlet-->
<router-outlet></router-outlet>
<!-- Footer -->
<ngx-loadable [module]="'footer'" [show]="true"></ngx-loadable>
</div>
View footer.module.ts
View angular.json
"lazyModules": [
"src/app/footer/footer.module"
],
View app.routes.ts
const appRoutes: Routes = [
{
path: rootPath,
component: TodoListComponent,
pathMatch: 'full'
},
{
path: completedTodoPath,
loadChildren: () =>
import('./todo-list-completed/todo-list-completed.module').then(
You can’t perform that action at this time.