Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
.question-conationer{
min-height: 500px;
max-height: 500px;
overflow-x: hidden;
overflow-y: auto;
padding-right: 10px;
}

Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<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>
<div class="question-conationer" *ngFor="let question of questions" [innerHTML]="question.answer"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,13 @@ import { HighlightService } from 'src/app/shared/services/highlight-syntax.servi
})
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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
.question-conationer{
min-height: 500px;
max-height: 500px;
overflow-x: hidden;
overflow-y: auto;
padding-right: 10px;
}

Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<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>
<div class="question-conationer" *ngFor="let question of questions" [innerHTML]="question.answer"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,13 @@ import { HighlightService } from 'src/app/shared/services/highlight-syntax.servi
})
export class JavascriptQuestionsComponent implements OnInit {
questions = javascriptInterviewQuestion;
slug:string = '';
totalQuestion = 0;
currentQuestion = 0;
routesData = Helper.setAllInterviewQuestionRoute('/interview-questions/javascript/', 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/javascript/${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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import { JavascriptQuestionsComponent } from './javascript-questions/javascript-
const routes: Routes = [
{
path:'', component: JavascriptQuestionsComponent
},
{
path:':slug', component: JavascriptQuestionsComponent
}
];

Expand Down
4 changes: 4 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ li {
font-weight: 500;
}

.question-conationer{
padding-bottom: 16px !important;
}

@media(max-width:992px) {
.cdk-overlay-pane {
width: 45%;
Expand Down
Loading