Skip to content

Instantly share code, notes, and snippets.

View cyberpirate92's full-sized avatar
🖖
live long and prosper

Ravi Theja cyberpirate92

🖖
live long and prosper
View GitHub Profile
// original data
x = {
name: 'John',
age: 20
};
// modify some value
x.age = 30;
//reassign object to change reference
export class CardComponent {
@Input() title: string;
@Input() body: string;
@Input() footer: string;
}
<div class="card border-dark col-sm-6">
<div class="card-body bg-light">
<h5 class="card-title text-primary">{{title}}</h5>
<p class="card-text">{{body}}</p>
<p class="card-text"><small class="text-muted">{{footer}}</small></p>
</div>
</div>
<div style="border: 1px">
<ng-content>
<!-- dynamic content here -->
</ng-content>
</div>
<home>
<!-- Projected content -->
Hello, <b>World!</b>
</home>
<!-- projects only divs -->
<ng-content select="div"></ng-content>
<!-- projects only buttons -->
<ng-content select="button"></ng-content>
<!-- projects only elements with class "someClass" -->
<ng-content select=".someClass"> </ng-content>
<!-- projects only divs with class "someClass" -->
<ng-content select="div.someClass"> </ng-content>
<!-- projects only elements having the attribute "someAttribute" ex: <p someAttribute></p> -->
<ng-content select="[someAttribute]"></ng-content>
<!-- projects only divs having the attribute "someAttribute" -->
<ng-content select="div[someAttribute]"></ng-content>
public void ConfigureServices(IServiceCollection services)
{
services.AddSignalR();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseFileServer(); // <--- Add this
}