-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from raj-rathod/rajesh
feat<Interview questions>
- Loading branch information
Showing
75 changed files
with
4,057 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +0,0 @@ | ||
.margin-top{ | ||
margin-top: 90px; | ||
} | ||
@media(max-width:992px){ | ||
.margin-top{ | ||
margin-top: 70px; | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
<div class="container"> | ||
<app-navbar></app-navbar> | ||
<div class="margin-top"> | ||
<app-breadcrumbs></app-breadcrumbs> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div> | ||
<app-previous-next-route></app-previous-next-route> | ||
<app-navbar></app-navbar> | ||
<router-outlet></router-outlet> | ||
<app-footer></app-footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/app/components/Interview/angular/angular-questions/angular-questions.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.question-conationer{ | ||
min-height: 500px; | ||
max-height: 500px; | ||
overflow-x: hidden; | ||
overflow-y: auto; | ||
padding-right: 10px; | ||
} |
6 changes: 6 additions & 0 deletions
6
src/app/components/Interview/angular/angular-questions/angular-questions.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<app-breadcrumbs [selectedRoute]="currentQuestion-1" [routersData]="routesData"></app-breadcrumbs> | ||
<div class="chip mb-2"> | ||
{{currentQuestion}}/{{totalQuestion}} | ||
</div> | ||
<div class="question-conationer" [innerHTML]="question"></div> | ||
<app-previous-next-route [selectedRoute]="currentQuestion-1" [routersData]="routesData"></app-previous-next-route> |
25 changes: 25 additions & 0 deletions
25
src/app/components/Interview/angular/angular-questions/angular-questions.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AngularQuestionsComponent } from './angular-questions.component'; | ||
|
||
describe('AngularQuestionsComponent', () => { | ||
let component: AngularQuestionsComponent; | ||
let fixture: ComponentFixture<AngularQuestionsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ AngularQuestionsComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AngularQuestionsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
53 changes: 53 additions & 0 deletions
53
src/app/components/Interview/angular/angular-questions/angular-questions.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { AfterViewChecked, AfterViewInit, Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute, ParamMap, Router } from '@angular/router'; | ||
import { angularInterviewQuestion } from 'src/app/core/interview-questions/angular/angular-metadata'; | ||
import { Helper } from 'src/app/helper/helper'; | ||
import { HighlightService } from 'src/app/shared/services/highlight-syntax.service'; | ||
|
||
@Component({ | ||
selector: 'app-angular-questions', | ||
templateUrl: './angular-questions.component.html', | ||
styleUrls: ['./angular-questions.component.css'] | ||
}) | ||
export class AngularQuestionsComponent implements OnInit, AfterViewInit, AfterViewChecked { | ||
questions = angularInterviewQuestion; | ||
slug:string = ''; | ||
totalQuestion = 0; | ||
currentQuestion = 0; | ||
routesData = Helper.setAllInterviewQuestionRoute('/interview-questions/angular/', this.questions); | ||
question = this.questions[0].answer; | ||
constructor( | ||
private highLightCode: HighlightService, | ||
private route: ActivatedRoute, | ||
private router: Router, | ||
) { } | ||
|
||
ngOnInit(): void { | ||
this.totalQuestion = this.questions.length; | ||
this.route.paramMap.subscribe((params: ParamMap) => { | ||
if(params.get('slug')){ | ||
this.slug = params.get('slug')! | ||
}else{ | ||
this.slug = this.questions[0].slug; | ||
this.router.navigate([`/interview-questions/angular/${this.slug}`]); | ||
} | ||
const index = this.questions.findIndex(question => question.slug === this.slug); | ||
if(index>-1){ | ||
this.question = this.questions[index].answer | ||
this.currentQuestion = index+1; | ||
}else{ | ||
this.router.navigate([`**`]); | ||
} | ||
|
||
}) | ||
} | ||
|
||
ngAfterViewInit(): void { | ||
this.highLightCode.highlightAll(); | ||
} | ||
|
||
ngAfterViewChecked(): void { | ||
this.highLightCode.highlightAll(); | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/app/components/Interview/angular/angular-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { AngularQuestionsComponent } from './angular-questions/angular-questions.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path:'', component: AngularQuestionsComponent | ||
}, | ||
{ | ||
path:':slug', component: AngularQuestionsComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class AngularRoutingModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { AngularRoutingModule } from './angular-routing.module'; | ||
import { AngularQuestionsComponent } from './angular-questions/angular-questions.component'; | ||
import { SharedModule } from 'src/app/shared/components/shared.module'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
AngularQuestionsComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
AngularRoutingModule, | ||
SharedModule | ||
] | ||
}) | ||
export class AngularModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
const routes: Routes = []; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class CssRoutingModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { CssRoutingModule } from './css-routing.module'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [], | ||
imports: [ | ||
CommonModule, | ||
CssRoutingModule | ||
] | ||
}) | ||
export class CssModule { } |
Empty file.
1 change: 1 addition & 0 deletions
1
src/app/components/Interview/html5/html5-questions/html5-questions.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>html5-questions works!</p> |
25 changes: 25 additions & 0 deletions
25
src/app/components/Interview/html5/html5-questions/html5-questions.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { Html5QuestionsComponent } from './html5-questions.component'; | ||
|
||
describe('Html5QuestionsComponent', () => { | ||
let component: Html5QuestionsComponent; | ||
let fixture: ComponentFixture<Html5QuestionsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ Html5QuestionsComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(Html5QuestionsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/app/components/Interview/html5/html5-questions/html5-questions.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-html5-questions', | ||
templateUrl: './html5-questions.component.html', | ||
styleUrls: ['./html5-questions.component.css'] | ||
}) | ||
export class Html5QuestionsComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/app/components/Interview/html5/html5-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
const routes: Routes = []; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class Html5RoutingModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { Html5RoutingModule } from './html5-routing.module'; | ||
import { Html5QuestionsComponent } from './html5-questions/html5-questions.component'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
Html5QuestionsComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
Html5RoutingModule | ||
] | ||
}) | ||
export class Html5Module { } |
7 changes: 7 additions & 0 deletions
7
...p/components/Interview/javascript/javascript-questions/javascript-questions.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.question-conationer{ | ||
min-height: 500px; | ||
max-height: 500px; | ||
overflow-x: hidden; | ||
overflow-y: auto; | ||
padding-right: 10px; | ||
} |
6 changes: 6 additions & 0 deletions
6
.../components/Interview/javascript/javascript-questions/javascript-questions.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<app-breadcrumbs [selectedRoute]="currentQuestion-1" [routersData]="routesData"></app-breadcrumbs> | ||
<div class="chip mb-2"> | ||
{{currentQuestion}}/{{totalQuestion}} | ||
</div> | ||
<div class="question-conationer" [innerHTML]="question"></div> | ||
<app-previous-next-route [selectedRoute]="currentQuestion-1" [routersData]="routesData"></app-previous-next-route> |
Oops, something went wrong.