graph TD;
feature-->domain
feature-->dataAccess[data-access]
dataAccess-->domain
feature-->ui
ui-->domain graph TD;
A[ParentComponent]--imports-->B[ChildComponent];flowchart TD
A[ContentChild] --> B;
B{Is static?} -- No --> C;
B -- Yes --> D;
C[Make the query<br>type optional] --> E(Access in<br>ngAfterContentInit<br>or later);
D(Add assertion<br>in ngOnInit or<br>ngOnChanges) --> F;
F[Add ! to<br>the query type] --> G(Access in<br>ngOnInit<br>or later)
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
| PS> az deployment sub what-if --location westeurope --template-file ./bicep/main.bicep | |
| Note: The result may contain false positive predictions (noise). | |
| You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues | |
| Resource and property changes are indicated with these symbols: | |
| + Create oviders/Microsoft | |
| ~ Modify | |
| = Nochange | |
| The deployment will update the following scopes |
flowchart TD
A[Deploy to production] --> B{Is it Friday?};
B -- Yes --> C[Do not deploy!];
B -- No --> D[Run deploy.sh to deploy!]
C ----> E[Enjoy your weekend!];
D ----> E[Enjoy your weekend!];
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, InjectionToken } from '@angular/core'; | |
| import { LumberjackLogDriverConfig, lumberjackLogDriverConfigToken } from '@ngworker/lumberjack'; | |
| export const myLogDriverConfigToken = new InjectionToken<LumberjackLogDriverConfig>('__MY_LOG_DRIVER_CONFIG__', { | |
| factory: () => inject(lumberjackLogDriverConfigToken), | |
| }); |
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 { Injectable, Inject } from '@angular/core'; | |
| import { configToken } from './config.token'; | |
| import { Config } from './config'; | |
| @Injectable({ | |
| providedIn: 'any', // 👈 Tree-shakable, only bundled if used | |
| }) | |
| export class ConfigService { | |
| constructor(@Inject(configToken) private config: Config) { |
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 { Location } from '@angular/common'; | |
| import { Component, Injectable, NgModule, NgZone } from '@angular/core'; | |
| import { TestBed } from '@angular/core/testing'; | |
| import { Router, RouterModule, Routes } from '@angular/router'; | |
| import { RouterTestingModule } from '@angular/router/testing'; | |
| import { of } from 'rxjs'; | |
| import { AuthGuard } from './auth.guard'; | |
| import { AuthService } from './auth.service'; |