この問題が発生しています:
HTML 要素のプロパティhrefにアクセスできません。このエラーが発生しています:
Property 'href' does not exist on type 'HTMLElement'.ts(2339)
これはコードです:
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements AfterViewInit {
title = 'clientes-app';
ngAfterViewInit(){
(function($) {
"use strict";
var path = window.location.href;
$("#layoutSidenav_nav .sb-sidenav a.nav-link").each(function() {
if (this.href === path) {
$(this).addClass("active");
}
});
// Toggle the side navigation
$("#sidebarToggle").on("click", function(e) {
e.preventDefault();
$("body").toggleClass("sb-sidenav-toggled");
});
})(jQuery);
}
}