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
HTML: | |
<input type="submit" class="btn btn-login register-submit" (click)="keyboardFocus(focusChange)" value="Stay on the page" #focusChange> | |
Component: | |
@ViewChild('focusChange') elChange: ElementRef; | |
setTimeout(() => { | |
this.elChange.nativeElement.focus(); |
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
**** HTML | |
** Important: add tabindex="-1" to child tag | |
<button id="btn" class="btn" type="button"> | |
<span class="btn__content" tabindex="-1"> | |
I'm a button! | |
</span> | |
</button> | |
<a class="btn" href="#x"> | |
<span class="btn__content" tabindex="-1"> |
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
*** In app module providers | |
{ provide: MatSortHeaderIntl, useClass: CustomMatSortHeaderIntl } | |
*** custom-mat-sort-header-intl.ts | |
create custom-mat-sort-header-intl.ts and in the file: | |
import { Injectable } from '@angular/core'; | |
import { Subject } from 'rxjs/internal/Subject'; |
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
public class TerminateCourseService : ITerminateCourseService | |
{ | |
public IVisaTerminationWorkflowService _visaTerminationWorkflow { get; set; } | |
public TerminateCourseService() | |
{ | |
} | |
public ITerminationWorkflowService GetTerminationWorkflow(TerminationReason terminationReason) // because IVisaTerminationWorkflowService inherit from ITerminationWorkflowService | |
{ |
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
C#: public Dictionary<string, string> ExtensionData { get; set; } | |
Angular Model: ExtensionData: { [key: string]: string }; | |
Implementation: this.worktrayItem.ExtensionData.SchoolTerm |
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
@Component({ | |
selector: 'app-school-year-change', | |
templateUrl: './school-year-change.component.html', | |
styleUrls: ['./school-year-change.component.scss'] | |
}) | |
export class SchoolYearChangeComponent extends WorktrayComponentBase implements OnInit { | |
private _footerButtons: FooterButton[]; | |
constructor(private ref: DynamicDialogRef) { |
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
xcode-select --install |
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
sudo chown -R $USER /usr/local/lib/node_modules |
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
public async Task<int> AutoCreateWelfareManagementWorkTrayItems(int defaultRunTerm, int defaultRunWeek) | |
{ | |
async Task<int> Func() | |
{ | |
return worktrayItemsCreatedCount; | |
} | |
return await ExecuteAsync(Func); | |
} | |
public async Task<ServiceResponse<int>> TerminateCourse(DateTime dateTime) |
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
**** send data to component via resolver | |
1. create resolver file -- ate-resolver.service.ts | |
import {Injectable, Inject} from '@angular/core'; | |
import {Resolve, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router'; | |
import { Observable } from 'rxjs'; | |
import { APP_CONFIG, IAppConfig } from '../../config/app.config'; | |
import { DataContextService } from 'src/app/service/datacontext.service'; |