import { YourNameComponent } from './pages/admin/YourName/YourName.component';
appRoutes: Routes = [
{
path: 'admin/YourName',
component: YourNameComponent,
canActivate: [AuthenticationGuard],
data: { title: 'Your Name', isNew: true }
},@NgModule({
declarations: [
YourNameComponent
Sunday, 26 March 2023
Dodanie nowego komponentu - app.module.ts
Saturday, 25 March 2023
Preparing Dev Env for Angular
Monday, 2 January 2023
Show active file in Solution Explorer
Tools > Options > Projects and Solutions > General > Track Active Item in Solution Explorer
Thursday, 25 August 2022
Using process.env in React
- Install
dotenv
package - Create .env file in root directory
- Add variables to the file like this:
REACT_APP_MOCK_API_URL=data1
REACT_APP_REST_KEY=data2
- Read variables like this:
const key = process.env.REACT_APP_REST_KEY;
const mockUrl = process.env.REACT_APP_MOCK_API_URL;
Important!
Variable name MUST begin with "REACT_APP_"
(Initially I called variable MOCK_API_URL. It took me few hours to figure out why key contained value and mockUrl was undefined.)
Tuesday, 17 May 2022
Zestawienie prepaid
Znalazłem "magiczny excel" zawierający porównanie pakietów "na kartę" we wszystkich polskich telekomach: https://drive.google.com/file/d/1wTRENPirHx9ZgyKj4oeKP2A-eaSYKn-e/view
Gdyby plik został jednak usunięty, na MEGA jest pobrana aktualna (na moment opublikowania tego wpisu) wersja: https://bit.ly/3sG7mwQ
Friday, 11 February 2022
Jak usunąć pliki z poprzedniej instalacji Windows, do których nie ma dostępu
takeown /F "D:\Program Files" /A /R /D Y
icacls "D:\Program Files" /T /grant administrators:F
rd /s /q "D:\Program Files"
Źródło: https://superuser.com/a/1028115
Monday, 31 January 2022
Duolingo invitation link
Monday, 27 December 2021
List of Breakpoints in Angular Material
Thursday, 23 December 2021
Thursday, 9 December 2021
Problem przy tworzeniu Azure Active Directory B2C
Potrzebuję katalogu Azure B2C dla mojego projektu.
Przy próbie utworzenia nowego katalogu dostaję taki błąd:
The subscription is not registered to use namespace 'Microsoft.AzureActiveDirectory'.
See https://aka.ms/rps-not-found for how to register subscriptions.
Rozwiązanie:
- Zaloguj się do Azure
-
Otwórz konsolę
- Konsola może wymagać stworzenia katalogów.
- W konsoli wpisz:
az provider register --namespace Microsoft.AzureActiveDirectory
Po kilku minutach powinno zadziałać. Możesz spróbować stworzyć katalog jeszcze raz.