Skip to content

Instantly share code, notes, and snippets.

View Jaydeep-007's full-sized avatar

Jaydeep Patil Jaydeep-007

View GitHub Profile
<div *ngFor="let student of students" class ="alert alert-secondary" role="alert" style="padding: 30px;margin: 40px;">
<h3>Student Detail</h3>
<h5>Student ID: {{student.Id}}</h5>
<h5>Student Name: {{student.Name}}</h5>
<ng-content></ng-content>
<h5>Student Address: {{student.Address}}</h5>
<h5>Student Age: {{student.Age}}</h5>
import { AfterContentInit, Component, ContentChild, ElementRef, Input } from '@angular/core';
@Component({
selector: 'app-studentsdetail',
templateUrl: './studentsdetail.component.html',
styleUrls: ['./studentsdetail.component.css']
})
export class StudentsdetailComponent implements AfterContentInit {
@Input() students! : any
<nav class="navbar navbar-light bg-light" style="padding: 30px;margin: 40px; justify-content:center">
<span class="navbar-brand mb-0 h1">Angular Demo</span>
</nav>
<app-studentsdetail [students]="student1">
<h5 #color>Student Internship Project: ABC</h5>
<h5>Student Contact No: 1111567890</h5>
</app-studentsdetail>
<app-studentsdetail [students]="student2">
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'ContentChildAndConetntChildrenDemo';
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace AzureKeyVaultDemo.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class SecretsController : ControllerBase
{
private readonly IConfiguration _configuration;
using Microsoft.Extensions.Configuration.AzureKeyVault;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Host.ConfigureAppConfiguration((context, config) =>
{
var settings = config.Build();
var keyVaultURL = settings["KeyVaultConfiguration:KeyVaultURL"];
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"KeyVaultConfiguration": {
"KeyVaultURL": "",
using AzureFileShareDemo.Repositories;
using Microsoft.AspNetCore.Mvc;
namespace AzureFileShareDemo.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class FilesController : ControllerBase
{
private readonly IFileShare fileShare;
using AzureFileShareDemo.Repositories;
using FileShare = AzureFileShareDemo.Repositories.FileShare;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddScoped<IFileShare, FileShare>();
builder.Services.AddControllers();
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"FileShareDetails": {
"FileShareName": "jdlearningfileshare"