Skip to content

Commit fd6f955

Browse files
Ismael Ramosiramos
authored andcommitted
feat(angular 8): improve material imports and load child with the new version
1 parent f318446 commit fd6f955

18 files changed

+43
-392
lines changed

package-lock.json

Lines changed: 0 additions & 359 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
"ng-bullet": "1.0.3",
104104
"ng-mocks": "8.0.0",
105105
"ng-packagr": "5.3.0",
106-
"node-sass": "4.12.0",
107106
"path": "0.12.7",
108107
"protractor": "5.4.2",
109108
"standard-version": "6.0.1",

src/app/app-routing.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ const routesNames = RoutesConfig.routesNames;
88

99
const routes: Routes = [
1010
{path: routesNames.home, component: HomePageComponent, pathMatch: 'full'},
11-
{path: routesNames.heroes.basePath, loadChildren: './modules/heroes/heroes.module#HeroesModule'},
11+
{path: routesNames.heroes.basePath, loadChildren: () => import('./modules/heroes/heroes.module').then(m => m.HeroesModule)},
1212
{path: routesNames.error404, component: Error404PageComponent},
13-
1413
{path: 'en', redirectTo: ''}, // because english language is the default one
1514

1615
// otherwise redirect to 404

src/app/app.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {NgxExampleLibraryComponent} from '@ismaestro/ngx-example-library';
1010
import {of} from 'rxjs';
1111
import {MockComponent} from 'ng-mocks';
1212
import {RouterTestingModule} from '@angular/router/testing';
13-
import {MatSnackBar} from '@angular/material';
1413
import {I18n} from '@ngx-translate/i18n-polyfill';
1514
import {TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core';
15+
import {MatSnackBar} from '@angular/material/snack-bar';
1616

1717
describe('AppComponent', () => {
1818
let component: AppComponent;

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Component, Inject, LOCALE_ID, OnInit, PLATFORM_ID, Renderer2} from '@angular/core';
22
import {Meta, Title} from '@angular/platform-browser';
33
import {NavigationEnd, Router} from '@angular/router';
4-
import {MatSnackBar} from '@angular/material';
4+
import {MatSnackBar} from '@angular/material/snack-bar';
55
import {UtilsHelperService} from './shared/services/utils-helper.service';
66
import {DOCUMENT, isPlatformBrowser} from '@angular/common';
77
import {I18n} from '@ngx-translate/i18n-polyfill';

src/app/modules/heroes/components/hero-remove/hero-remove.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {HeroRemoveComponent} from './hero-remove.component';
22
import {ComponentFixture, TestBed} from '@angular/core/testing';
33
import {configureTestSuite} from 'ng-bullet';
44
import {MockModule} from 'ng-mocks';
5-
import {MatDialogModule} from '@angular/material';
5+
import {MatDialogModule} from '@angular/material/dialog';
66

77
describe('HeroRemoveComponent', () => {
88
let component: HeroRemoveComponent;

src/app/modules/heroes/pages/hero-detail-page/hero-detail-page.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {HeroLoadingComponent} from '../../../../shared/components/hero-loading/h
66
import {HeroCardComponent} from '../../../../shared/components/hero-card/hero-card.component';
77
import {MockComponent, MockModule} from 'ng-mocks';
88
import {FirebaseModule} from '../../../../shared/modules/firebase.module';
9-
import {MatSnackBar} from '@angular/material';
9+
import {MatSnackBar} from '@angular/material/snack-bar';
1010
import {TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core';
1111
import {I18n} from '@ngx-translate/i18n-polyfill';
1212
import {HeroService} from '../../shared/hero.service';

src/app/modules/heroes/pages/heroes-list-page/heroes-list-page.component.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import {HeroRemoveComponent} from '../../components/hero-remove/hero-remove.comp
1010
import {Router} from '@angular/router';
1111
import {APP_CONFIG, AppConfig} from '../../../../configs/app.config';
1212
import {MockComponent, MockModule} from 'ng-mocks';
13-
import {MatDialog, MatError, MatFormField, MatIcon, MatList, MatListItem, MatSnackBar} from '@angular/material';
13+
import {MatDialog} from '@angular/material/dialog';
14+
import {MatError} from '@angular/material/typings';
15+
import {MatFormField} from '@angular/material/form-field';
16+
import {MatIcon} from '@angular/material/icon';
17+
import {MatList, MatListItem} from '@angular/material/list';
18+
import {MatSnackBar} from '@angular/material/snack-bar';
1419
import {NgxScrollToFirstInvalidModule} from '@ismaestro/ngx-scroll-to-first-invalid';
1520
import {RouterTestingModule} from '@angular/router/testing';
1621
import {TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core';

src/app/modules/heroes/pages/heroes-list-page/heroes-list-page.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import {Component, Inject, OnInit, ViewChild} from '@angular/core';
22
import {Hero} from '../../shared/hero.model';
33
import {HeroService} from '../../shared/hero.service';
44
import {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';
5-
import {MatDialog, MatSnackBar} from '@angular/material';
5+
import {MatDialog} from '@angular/material/dialog';
6+
import {MatSnackBar} from '@angular/material/snack-bar';
67
import {Router} from '@angular/router';
78
import {UtilsHelperService} from '../../../../shared/services/utils-helper.service';
89
import {HeroRemoveComponent} from '../../components/hero-remove/hero-remove.component';

src/app/modules/heroes/shared/hero.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {Hero} from './hero.model';
44
import {HttpErrorResponse} from '@angular/common/http';
55
import {configureTestSuite} from 'ng-bullet';
66
import {FirebaseModule} from '../../../shared/modules/firebase.module';
7-
import {MatSnackBar} from '@angular/material';
7+
import {MatSnackBar} from '@angular/material/snack-bar';
88
import {TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core';
99
import {I18n} from '@ngx-translate/i18n-polyfill';
1010
import {CookieService} from 'ngx-cookie';

0 commit comments

Comments
 (0)