This file contains hidden or 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
function initializeCounterComponent() { | |
let counterClick = document.querySelector("#counterClick"); | |
if (counterClick) { | |
counterClick.addEventListener("click", (e) => { | |
console.log("click JavaScript"); | |
let myButton = e.target; | |
myButton.innerHTML = "Hello"; | |
}); | |
} | |
} |
This file contains hidden or 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
function initializeCounterComponent(container) { | |
var chart = container.querySelector('#myChart'); | |
inicializarChart(chart); | |
var boton = container.querySelector("#counterClick"); | |
var title = container.querySelector("h1"); | |
if (boton) { | |
boton.addEventListener("click", (e) => { | |
let button = e.target; | |
button.innerHTML = "Hola"; | |
title.innerHTML = "El botón ha sido clickeado!"; |
This file contains hidden or 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
@page "/counter" | |
@inject IJSRuntime js | |
<div @ref="container" class="counter-container"> | |
<h1>Counter</h1> | |
<p>Current count: @currentCount</p> | |
<div class="form-group"> | |
<button id="counterClick" class="btn btn-primary counterClickC" @onclick="IncrementCount">Click me</button> | |
</div> |
This file contains hidden or 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
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/css/tempusdominus-bootstrap-4.min.css" /> | |
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" integrity="sha256-R4pqcOYV8lt7snxMQO/HSbVCFRPMdrhAFMH+vr9giYI=" crossorigin="anonymous"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script> | |
<script src="Utilities.js"></scri |
This file contains hidden or 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
SELECT [a].[Id] AS [UserId], [a].[UserName], [a1].[Id] AS [RoleId], [a1].[Name] AS [RoleName] | |
FROM [AspNetUsers] AS [a] | |
INNER JOIN [AspNetUserRoles] AS [a0] ON [a].[Id] = [a0].[UserId] | |
INNER JOIN [AspNetRoles] AS [a1] ON [a0].[RoleId] = [a1].[Id] |
This file contains hidden or 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
var listado = await (from user in context.Users | |
join userRoles in context.UserRoles on user.Id equals userRoles.UserId | |
join role in context.Roles on userRoles.RoleId equals role.Id | |
select new { UserId = user.Id, UserName = user.UserName, RoleId = role.Id, RoleName = role.Name }) | |
.ToListAsync(); |
This file contains hidden or 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
$(document).on("click", "#counterClick", function (e) { | |
var container = $(this).closest(".counter-container").get()[0]; | |
var title = container.querySelector("h1"); | |
console.log("click JavaScript"); | |
$(this).html("Hola"); | |
title.innerHTML = "El botón ha sido clickeado jQuery!"; | |
}); |
This file contains hidden or 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
function initializeCounterComponent(container) { | |
var boton = container.querySelector("#counterClick"); | |
var title = container.querySelector("h1"); | |
if (boton) { | |
boton.addEventListener("click", (e) => { | |
console.log("click JavaScript"); | |
let button = e.target; | |
button.innerHTML = "Hola"; | |
title.innerHTML = "El botón ha sido clickeado!"; | |
}); |
This file contains hidden or 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
@page "/counter" | |
@inject IJSRuntime js | |
<div @ref="container"> | |
<h1>Counter</h1> | |
<p>Current count: @currentCount</p> | |
<button @ref="miBoton" id="counterClick" class="btn btn-primary counterClickC" @onclick="IncrementCount">Click me</button> |
This file contains hidden or 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
function initializeCounterComponent(boton) { | |
boton.addEventListener("click", (e) => { | |
console.log("click JavaScript"); | |
let button = e.target; | |
button.innerHTML = "Hola"; | |
}); | |
}; |