1- import { BrowserModule } from '@angular/platform-browser' ;
21import { NgModule } from '@angular/core' ;
32import { FormsModule } from '@angular/forms' ;
3+ import { BrowserModule } from '@angular/platform-browser' ;
44import { RouterModule } from '@angular/router' ;
55
66import { AppComponent } from './app.component' ;
7- import { MazeComponent } from './maze/maze.component' ;
87import { CandyComponent } from './candy/candy.component' ;
98import { CanvasComponent } from './candy/canvas/canvas.component' ;
10- import { Math1Component } from './math1/math1.component' ;
11- import { EightPuzzleComponent } from './eight-puzzle/eight-puzzle.component' ;
129import { EightPuzzleTileComponent } from './eight-puzzle/eight-puzzle-tile/eight-puzzle-tile.component' ;
13- import { Math2Component } from './math2/math2 .component' ;
10+ import { EightPuzzleComponent } from './eight-puzzle/eight-puzzle .component' ;
1411import { MathModule } from './math/math.module' ;
12+ import { Math1Component } from './math1/math1.component' ;
13+ import { Math2Component } from './math2/math2.component' ;
1514import { Math3Component } from './math3/math3.component' ;
15+ import { MazeComponent } from './maze/maze.component' ;
1616
1717@NgModule ( {
1818 declarations : [
@@ -30,16 +30,19 @@ import { Math3Component } from './math3/math3.component';
3030 BrowserModule ,
3131 FormsModule ,
3232 MathModule ,
33- RouterModule . forRoot ( [
34- { path : '' , redirectTo : 'maze' , pathMatch : 'full' } ,
35- { path : 'maze' , component : MazeComponent } ,
36- { path : 'candy' , component : CandyComponent } ,
37- { path : 'math1' , component : Math1Component } ,
38- { path : 'math2' , component : Math2Component } ,
39- { path : 'math3' , component : Math3Component } ,
40- { path : '8-puzzle' , component : EightPuzzleComponent } ,
41- { path : '**' , redirectTo : '' } ,
42- ] ) ,
33+ RouterModule . forRoot (
34+ [
35+ { path : '' , redirectTo : 'maze' , pathMatch : 'full' } ,
36+ { path : 'maze' , component : MazeComponent } ,
37+ { path : 'candy' , component : CandyComponent } ,
38+ { path : 'math1' , component : Math1Component } ,
39+ { path : 'math2' , component : Math2Component } ,
40+ { path : 'math3' , component : Math3Component } ,
41+ { path : '8-puzzle' , component : EightPuzzleComponent } ,
42+ { path : '**' , redirectTo : '' } ,
43+ ] ,
44+ { useHash : true }
45+ ) ,
4346 ] ,
4447 bootstrap : [ AppComponent ] ,
4548} )
0 commit comments