This file contains 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
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddSignalR(); | |
} |
This file contains 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
<!-- 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> |
This file contains 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
<!-- 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> |
This file contains 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
<!-- projects only divs --> | |
<ng-content select="div"></ng-content> | |
<!-- projects only buttons --> | |
<ng-content select="button"></ng-content> |
This file contains 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
<home> | |
<!-- Projected content --> | |
Hello, <b>World!</b> | |
</home> |
This file contains 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
<div style="border: 1px"> | |
<ng-content> | |
<!-- dynamic content here --> | |
</ng-content> | |
</div> |
This file contains 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
<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> |
This file contains 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
export class CardComponent { | |
@Input() title: string; | |
@Input() body: string; | |
@Input() footer: string; | |
} |
This file contains 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
// original data | |
x = { | |
name: 'John', | |
age: 20 | |
}; | |
// modify some value | |
x.age = 30; | |
//reassign object to change reference |
This file contains 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
// original data | |
x = [1, 2, 3, 4] | |
// making a change | |
x.push(5); | |
// reassign array to change reference | |
x = [...x]; |