Skip to content

Commit

Permalink
Merge pull request #168 from raj-rathod/rajesh
Browse files Browse the repository at this point in the history
Rajesh
  • Loading branch information
raj-rathod authored May 23, 2024
2 parents ef2d3eb + 0d4341c commit 76907b5
Show file tree
Hide file tree
Showing 16 changed files with 2,667 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { HomeComponent } from './layout/home/home.component';
import { PageNotFoundComponent } from './layout/page-not-found/page-not-found.component';
import { DsaMainComponent } from './layout/dsa-main/dsa-main.component';
import { InterviewQuestionComponent } from './layout/interview-question/interview-question.component';
import { ProblemSolvingComponent } from './layout/problem-solving/problem-solving.component';

const routes: Routes = [
{
Expand Down Expand Up @@ -64,6 +65,18 @@ const routes: Routes = [
}
]
},
{
path:'problem-solving-trick',
component: ProblemSolvingComponent,
children:[
{
path:'',
loadChildren: () => import('./components/problem-solving/problem-solving.module').then(
(m) => m.ProblemSolvingModule
)
},
]
},
{
path: '**',
component: PageNotFoundComponent,
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import { DsaMainComponent } from './layout/dsa-main/dsa-main.component';
import { InterviewQuestionComponent } from './layout/interview-question/interview-question.component';
import { ProblemSolvingComponent } from './layout/problem-solving/problem-solving.component';


@NgModule({
Expand All @@ -28,6 +29,7 @@ import { InterviewQuestionComponent } from './layout/interview-question/intervie
PageNotFoundComponent,
DsaMainComponent,
InterviewQuestionComponent,
ProblemSolvingComponent,
],
imports: [
FormsModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { StringProblemComponent } from './string-problem/string-problem.component';

const routes: Routes = [
{
path:'', pathMatch:'full', redirectTo:'string'
},
{
path:'string', component: StringProblemComponent
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ProblemSolvingRoutingModule { }
17 changes: 17 additions & 0 deletions src/app/components/problem-solving/problem-solving.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ProblemSolvingRoutingModule } from './problem-solving-routing.module';
import { StringProblemComponent } from './string-problem/string-problem.component';


@NgModule({
declarations: [
StringProblemComponent
],
imports: [
CommonModule,
ProblemSolvingRoutingModule
]
})
export class ProblemSolvingModule { }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div [innerHTML]="stringTips"></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { StringProblemComponent } from './string-problem.component';

describe('StringProblemComponent', () => {
let component: StringProblemComponent;
let fixture: ComponentFixture<StringProblemComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ StringProblemComponent ]
})
.compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(StringProblemComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { StringTips } from 'src/app/core/problem-solving/string';
import { HighlightService } from 'src/app/shared/services/highlight-syntax.service';

@Component({
selector: 'app-string-problem',
templateUrl: './string-problem.component.html',
styleUrls: ['./string-problem.component.css']
})
export class StringProblemComponent implements OnInit, AfterViewInit {
stringTips = StringTips
constructor(
private highLightCode: HighlightService,
) { }

ngOnInit(): void {
}

ngAfterViewInit(): void {
this.highLightCode.highlightAll();
}

}
Loading

0 comments on commit 76907b5

Please sign in to comment.