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
<hello | |
[config]="{ | |
name: 'Firefly Semantics Slice', | |
language: 'typescript', | |
responsive: true | |
}" | |
></hello> | |
<hello | |
[config]="{ name: name, language: 'typescript', responsive: false }" |
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
import { AfterViewInit, Component, Input } from '@angular/core'; | |
export type Language = 'javascript' | 'typescript' | 'elixir'; | |
export class Config { | |
name: string = 'RxJS'; | |
responsive: boolean = true; | |
language: Language = 'typescript'; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Home</title> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<!-- | |
Need a visual blank slate? | |
Remove all code in `styles.css`! | |
--> |
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
import { NgModule } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { FormsModule } from '@angular/forms'; | |
import { AppComponent } from './app.component'; | |
import { HelloComponent } from './hello.component'; | |
import { GreetingServiceModule } from './services/greeting-service.module'; | |
import { AppRoutingModule } from './app-routing.module'; | |
@NgModule({ |
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
import { ModuleWithProviders, NgModule } from '@angular/core'; | |
import { GreetingService } from './greeting.service'; | |
import { GreetingServiceConfig } from './greeting-service.config'; | |
import { GREETING_SERVICE_CONFIG_INJECTION_TOKEN } from './greeting-service.token'; | |
@NgModule({ | |
providers: [GreetingService], | |
}) | |
export class GreetingServiceModule { |
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
import { Inject, Injectable } from '@angular/core'; | |
import { GreetingServiceConfig } from './greeting-service.config'; | |
import { GREETING_SERVICE_CONFIG_INJECTION_TOKEN } from './greeting-service.token'; | |
@Injectable() | |
export class GreetingService { | |
constructor( | |
@Inject(GREETING_SERVICE_CONFIG_INJECTION_TOKEN) | |
private config: GreetingServiceConfig |
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
@Directive({ selector: '[isReady]' }) | |
export class ReadyDirective implements OnInit { | |
@Input('isReady') isReady: boolean; | |
constructor( | |
private templateRef: TemplateRef<void>, | |
private vcr: ViewContainerRef | |
) {} | |
ngOnInit() { |
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
@Directive({ selector: '[isReady]' }) | |
export class ReadyDirective implements OnInit { | |
@Input('isReady') isReady: boolean; | |
constructor( | |
private templateRef: TemplateRef<void>, | |
private vcr: ViewContainerRef | |
) {} | |
ngOnInit() { |
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
color: ( | |
primary: ( | |
50: #e8eaf6, | |
100: #c5cae9, | |
200: #9fa8da, | |
300: #7986cb, | |
400: #5c6bc0, | |
500: #3f51b5, | |
600: #3949ab, | |
700: #303f9f, |
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
nav { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
background-color: aqua; | |
width: 20rem; | |
height: 20rem; | |
} | |
.container { |
NewerOlder