mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build(docs-infra): upgrade tslint to 5.15.0 and codelyzer to 5.0.0 (#29926)
This commit also changes the `tslint.json` config file to (reasonably closely) match what the cli would generate for a new app. PR Close #29926
This commit is contained in:
committed by
Andrew Kushnir
parent
eb85c8a742
commit
282167a37f
@@ -48,16 +48,15 @@ export class CodeTabsComponent implements OnInit, AfterViewInit {
|
||||
|
||||
@Input() linenums: string;
|
||||
|
||||
@ViewChild('content', { static: true }) content: ElementRef;
|
||||
@ViewChild('content', { static: true }) content: ElementRef<HTMLDivElement>;
|
||||
|
||||
@ViewChildren(CodeComponent) codeComponents: QueryList<CodeComponent>;
|
||||
|
||||
ngOnInit() {
|
||||
this.tabs = [];
|
||||
const codeExamples = this.content.nativeElement.querySelectorAll('code-pane');
|
||||
const codeExamples = Array.from(this.content.nativeElement.querySelectorAll('code-pane'));
|
||||
|
||||
for (let i = 0; i < codeExamples.length; i++) {
|
||||
const tabContent = codeExamples[i];
|
||||
for (const tabContent of codeExamples) {
|
||||
this.tabs.push(this.getTabInfo(tabContent));
|
||||
}
|
||||
}
|
||||
@@ -69,7 +68,7 @@ export class CodeTabsComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
/** Gets the extracted TabInfo data from the provided code-pane element. */
|
||||
private getTabInfo(tabContent: HTMLElement): TabInfo {
|
||||
private getTabInfo(tabContent: Element): TabInfo {
|
||||
return {
|
||||
class: tabContent.getAttribute('class'),
|
||||
code: tabContent.innerHTML,
|
||||
|
||||
Reference in New Issue
Block a user