_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
angular/adev/src/content/examples/router/src/app/page-not-found/page-not-found.component.ts_0_250
import {Component} from '@angular/core'; @Component({ selector: 'app-page-not-found', templateUrl: './page-not-found.component.html', styleUrls: ['./page-not-found.component.css'], standalone: false, }) export class PageNotFoundComponent {}
{ "end_byte": 250, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/page-not-found/page-not-found.component.ts" }
angular/adev/src/content/examples/router/src/app/page-not-found/page-not-found.component.html_0_23
<h2>Page not found</h2>
{ "end_byte": 23, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/page-not-found/page-not-found.component.html" }
angular/adev/src/content/examples/router/src/app/auth/auth.guard.4.ts_0_718
// #docplaster // #docregion import {inject} from '@angular/core'; import {Router, NavigationExtras} from '@angular/router'; import {AuthService} from './auth.service'; export const authGuard = () => { const authService = inject(AuthService); const router = inject(Router); if (authService.isLoggedIn) { retu...
{ "end_byte": 718, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.guard.4.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth.service.ts_0_507
// #docregion import {Injectable} from '@angular/core'; import {Observable, of} from 'rxjs'; import {tap, delay} from 'rxjs/operators'; @Injectable({ providedIn: 'root', }) export class AuthService { isLoggedIn = false; // store the URL so we can redirect after logging in redirectUrl: string | null = null; ...
{ "end_byte": 507, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.service.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth.guard.1.ts_0_130
// #docregion export const authGuard = () => { console.log('authGuard#canActivate called'); return true; }; // #enddocregion
{ "end_byte": 130, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.guard.1.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth.guard.ts_0_704
// #docplaster import {inject} from '@angular/core'; import {Router, NavigationExtras} from '@angular/router'; import {AuthService} from './auth.service'; export const authGuard = () => { const router = inject(Router); const authService = inject(AuthService); if (authService.isLoggedIn) { return true; } ...
{ "end_byte": 704, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.guard.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth-routing.module.ts_0_447
// #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {authGuard} from './auth.guard'; import {AuthService} from './auth.service'; import {LoginComponent} from './login/login.component'; const authRoutes: Routes = [{path: 'login', component: LoginComponent}]...
{ "end_byte": 447, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth-routing.module.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth.module.ts_0_380
import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {LoginComponent} from './login/login.component'; import {AuthRoutingModule} from './auth-routing.module'; @NgModule({ imports: [CommonModule, FormsModule, AuthRoutingModule], de...
{ "end_byte": 380, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.module.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth.guard.2.ts_0_391
// #docregion import {inject} from '@angular/core'; import {Router} from '@angular/router'; import {AuthService} from './auth.service'; export const authGuard = () => { const authService = inject(AuthService); const router = inject(Router); if (authService.isLoggedIn) { return true; } // Redirect to t...
{ "end_byte": 391, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.guard.2.ts" }
angular/adev/src/content/examples/router/src/app/auth/auth.guard.3.ts_0_358
import {inject} from '@angular/core'; import {Router} from '@angular/router'; import {AuthService} from './auth.service'; export const authGuard = () => { const authService = inject(AuthService); const router = inject(Router); if (authService.isLoggedIn) { return true; } // Redirect to the login page ...
{ "end_byte": 358, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/auth.guard.3.ts" }
angular/adev/src/content/examples/router/src/app/auth/login/login.component.ts_0_1466
// #docregion import {Component} from '@angular/core'; import {NavigationExtras, Router} from '@angular/router'; import {AuthService} from '../auth.service'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'], standalone: false, }) export class Login...
{ "end_byte": 1466, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/login/login.component.ts" }
angular/adev/src/content/examples/router/src/app/auth/login/login.component.1.ts_0_1116
// #docregion import {Component} from '@angular/core'; import {Router} from '@angular/router'; import {AuthService} from '../auth.service'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'], standalone: false, }) export class LoginComponent { mess...
{ "end_byte": 1116, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/login/login.component.1.ts" }
angular/adev/src/content/examples/router/src/app/auth/login/login.component.html_0_225
<h2>Login</h2> <p>{{ message }}</p> <p> <button type="button" (click)="login()" *ngIf="!authService.isLoggedIn">Login</button> <button type="button" (click)="logout()" *ngIf="authService.isLoggedIn">Logout</button> </p>
{ "end_byte": 225, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/auth/login/login.component.html" }
angular/adev/src/content/examples/router/src/app/heroes/heroes.module.ts_0_497
import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {HeroListComponent} from './hero-list/hero-list.component'; import {HeroDetailComponent} from './hero-detail/hero-detail.component'; import {HeroesRoutingModule} from './heroes-rout...
{ "end_byte": 497, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/heroes.module.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero.ts_0_56
export interface Hero { id: number; name: string; }
{ "end_byte": 56, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero.ts" }
angular/adev/src/content/examples/router/src/app/heroes/heroes-routing.module.ts_0_700
// #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {HeroListComponent} from './hero-list/hero-list.component'; import {HeroDetailComponent} from './hero-detail/hero-detail.component'; const heroesRoutes: Routes = [ {path: 'heroes', redirectTo: '/superh...
{ "end_byte": 700, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/heroes-routing.module.ts" }
angular/adev/src/content/examples/router/src/app/heroes/mock-heroes.ts_0_328
import {Hero} from './hero'; export const HEROES: Hero[] = [ {id: 12, name: 'Dr. Nice'}, {id: 13, name: 'Bombasto'}, {id: 14, name: 'Celeritas'}, {id: 15, name: 'Magneta'}, {id: 16, name: 'RubberMan'}, {id: 17, name: 'Dynama'}, {id: 18, name: 'Dr. IQ'}, {id: 19, name: 'Magma'}, {id: 20, name: 'Tornad...
{ "end_byte": 328, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/mock-heroes.ts" }
angular/adev/src/content/examples/router/src/app/heroes/heroes-routing.module.2.ts_0_590
// #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {HeroListComponent} from './hero-list/hero-list.component'; import {HeroDetailComponent} from './hero-detail/hero-detail.component'; const heroesRoutes: Routes = [ {path: 'heroes', component: HeroListC...
{ "end_byte": 590, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/heroes-routing.module.2.ts" }
angular/adev/src/content/examples/router/src/app/heroes/heroes-routing.module.1.ts_0_605
// #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {HeroListComponent} from './hero-list/hero-list.component'; import {HeroDetailComponent} from './hero-detail/hero-detail.component'; const heroesRoutes: Routes = [ {path: 'heroes', component: HeroListC...
{ "end_byte": 605, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/heroes-routing.module.1.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero.service.ts_0_764
// #docregion import {Injectable} from '@angular/core'; import {Observable, of} from 'rxjs'; import {map} from 'rxjs/operators'; import {Hero} from './hero'; import {HEROES} from './mock-heroes'; import {MessageService} from '../message.service'; @Injectable({ providedIn: 'root', }) export class HeroService { co...
{ "end_byte": 764, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero.service.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.3.ts_0_1326
// #docplaster // #docregion // #docregion rxjs-operator-import import {switchMap} from 'rxjs/operators'; // #enddocregion rxjs-operator-import import {Component, OnInit} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {Observable} from 'rxjs'; import {HeroService} from '...
{ "end_byte": 1326, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.3.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts_0_847
// Snapshot version // #docregion import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Observable} from 'rxjs'; import {HeroService} from '../hero.service'; import {Hero} from '../hero'; @Component({ selector: 'app-hero-detail', templateUrl: './hero-deta...
{ "end_byte": 847, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.ts_0_1156
// #docplaster // #docregion import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, ParamMap, Router} from '@angular/router'; import {Observable} from 'rxjs'; import {switchMap} from 'rxjs/operators'; import {Hero} from '../hero'; import {HeroService} from '../hero.service'; @Component({ selector:...
{ "end_byte": 1156, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.css_0_84
button { margin-top: 1rem; } label { display: block; margin-bottom: .5rem; }
{ "end_byte": 84, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.css" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.1.ts_0_975
// #docplaster // #docregion import {switchMap} from 'rxjs/operators'; import {Component, OnInit} from '@angular/core'; import {Observable} from 'rxjs'; // #docregion imports import {Router, ActivatedRoute, ParamMap} from '@angular/router'; // #enddocregion imports import {HeroService} from '../hero.service'; import {...
{ "end_byte": 975, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.1.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.html_0_304
<h2>Heroes</h2> <div *ngIf="hero$ | async as hero"> <h3>{{ hero.name }}</h3> <p>Id: {{ hero.id }}</p> <label for="hero-name">Hero name: </label> <input type="text" id="hero-name" [(ngModel)]="hero.name" placeholder="name"/> <button type="button" (click)="gotoHeroes(hero)">Back</button> </div>
{ "end_byte": 304, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.html" }
angular/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.4.ts_0_982
// #docplaster // #docregion import {Component, Input, OnInit} from '@angular/core'; import {Router} from '@angular/router'; import {Observable} from 'rxjs'; import {Hero} from '../hero'; import {HeroService} from '../hero.service'; @Component({ selector: 'app-hero-detail', templateUrl: './hero-detail.component.h...
{ "end_byte": 982, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.4.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.css_0_882
/* HeroListComponent's private CSS styles */ .heroes { margin: 0 0 2em 0; list-style-type: none; padding: 0; width: 100%; } .heroes li { position: relative; cursor: pointer; } .heroes li:hover { left: .1em; } .heroes a { color: black; text-decoration: none; display: block; font-size: 1.2rem; b...
{ "end_byte": 882, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.css" }
angular/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.html_0_452
<h2>Heroes</h2> <ul class="items"> <li *ngFor="let hero of heroes$ | async"> <!-- #docregion nav-to-detail --> <!-- #docregion link-parameters-array --> <a [routerLink]="['/hero', hero.id]"> <!-- #enddocregion link-parameters-array --> <span class="badge">{{ hero.id }}</span>{{ hero.name }} ...
{ "end_byte": 452, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.html" }
angular/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.ts_0_561
// TODO: Feature Componentized like HeroCenter import {Component, OnInit} from '@angular/core'; import {Observable} from 'rxjs'; import {HeroService} from '../hero.service'; import {Hero} from '../hero'; @Component({ selector: 'app-hero-list', templateUrl: './hero-list.component.1.html', styleUrls: ['./hero-lis...
{ "end_byte": 561, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.ts_0_1086
// #docplaster // #docregion // TODO: Feature Componentized like CrisisCenter // #docregion rxjs-imports import {Observable} from 'rxjs'; import {switchMap} from 'rxjs/operators'; // #enddocregion rxjs-imports import {Component, OnInit} from '@angular/core'; // #docregion import-router import {ActivatedRoute} from '@an...
{ "end_byte": 1086, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.ts" }
angular/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.html_0_321
<h2>Heroes</h2> <ul class="heroes"> <li *ngFor="let hero of heroes$ | async" [class.selected]="hero.id === selectedId"> <a [routerLink]="['/hero', hero.id]"> <span class="badge">{{ hero.id }}</span>{{ hero.name }} </a> </li> </ul> <button type="button" routerLink="/sidekicks">Go to sidekicks</button>...
{ "end_byte": 321, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/heroes/hero-list/hero-list.component.html" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.3.ts_0_1107
import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {CrisisCenterHomeComponent} from './crisis-center-home/crisis-center-home.component'; import {CrisisListComponent} from './crisis-list/crisis-list.component'; import {CrisisCenterComponent} from './crisis-center/crisis...
{ "end_byte": 1107, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.3.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-detail-resolver.1.ts_0_57
// #docregion export function crisisDetailResolver() {}
{ "end_byte": 57, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-detail-resolver.1.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis.service.ts_0_931
// #docplaster // #docregion import {BehaviorSubject} from 'rxjs'; import {map} from 'rxjs/operators'; import {Injectable} from '@angular/core'; import {MessageService} from '../message.service'; import {Crisis} from './crisis'; import {CRISES} from './mock-crises'; @Injectable({ providedIn: 'root', }) export class...
{ "end_byte": 931, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis.service.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center.module.ts_0_795
// #docregion import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {CommonModule} from '@angular/common'; import {CrisisCenterHomeComponent} from './crisis-center-home/crisis-center-home.component'; import {CrisisListComponent} from './crisis-list/crisis-list.component'; import {C...
{ "end_byte": 795, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center.module.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.2.ts_0_1252
import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {CrisisCenterHomeComponent} from './crisis-center-home/crisis-center-home.component'; import {CrisisListComponent} from './crisis-list/crisis-list.component'; import {CrisisCenterComponent} from './crisis-center/crisis...
{ "end_byte": 1252, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.2.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.ts_0_1285
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {CrisisCenterHomeComponent} from './crisis-center-home/crisis-center-home.component'; import {CrisisListComponent} from './crisis-list/crisis-list.component'; import {CrisisCenterComponent}...
{ "end_byte": 1285, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/mock-crises.ts_0_287
// #docregion import {Crisis} from './crisis'; export const CRISES: Crisis[] = [ {id: 1, name: 'Dragon Burning Cities'}, {id: 2, name: 'Sky Rains Great White Sharks'}, {id: 3, name: 'Giant Asteroid Heading For Earth'}, {id: 4, name: 'Procrastinators Meeting Delayed Again'}, ];
{ "end_byte": 287, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/mock-crises.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-detail-resolver.ts_0_721
// #docregion import {inject} from '@angular/core'; import {ActivatedRouteSnapshot, ResolveFn, Router} from '@angular/router'; import {EMPTY, of} from 'rxjs'; import {mergeMap} from 'rxjs/operators'; import {Crisis} from './crisis'; import {CrisisService} from './crisis.service'; export const crisisDetailResolver: Re...
{ "end_byte": 721, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-detail-resolver.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.1.ts_0_1088
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {CrisisCenterHomeComponent} from './crisis-center-home/crisis-center-home.component'; import {CrisisListComponent} from './crisis-list/crisis-list.component'; import {CrisisCenterComponent}...
{ "end_byte": 1088, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.1.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis.ts_0_58
export interface Crisis { id: number; name: string; }
{ "end_byte": 58, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.4.ts_0_1298
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {CrisisCenterHomeComponent} from './crisis-center-home/crisis-center-home.component'; import {CrisisListComponent} from './crisis-list/crisis-list.component'; import {CrisisCenterComponent}...
{ "end_byte": 1298, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-routing.module.4.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.ts_0_261
// #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-crisis-center', templateUrl: './crisis-center.component.html', styleUrls: ['./crisis-center.component.css'], standalone: false, }) export class CrisisCenterComponent {}
{ "end_byte": 261, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.html_0_55
<h2>Crisis Center</h2> <router-outlet></router-outlet>
{ "end_byte": 55, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.html" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.ts_0_280
// #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-crisis-center-home', templateUrl: './crisis-center-home.component.html', styleUrls: ['./crisis-center-home.component.css'], standalone: false, }) export class CrisisCenterHomeComponent {}
{ "end_byte": 280, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.html_0_38
<h3>Welcome to the Crisis Center</h3>
{ "end_byte": 38, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.html" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.css_0_78
h2 { font-size: 1.5rem; } input { font-size: 1rem; margin-top: 1rem; }
{ "end_byte": 78, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.css" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts_0_1999
// #docplaster // #docregion import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Observable} from 'rxjs'; import {Crisis} from '../crisis'; import {DialogService} from '../../dialog.service'; @Component({ selector: 'app-crisis-detail', templateUrl: './c...
{ "end_byte": 1999, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.html_0_349
<div *ngIf="crisis"> <h3>{{ editName }}</h3> <p>Id: {{ crisis.id }}</p> <label for="crisis-name">Crisis name: </label> <input type="text" id="crisis-name" [(ngModel)]="editName" placeholder="name"/> <div> <button type="button" (click)="save()">Save</button> <button type="button" (click)="cancel()">Can...
{ "end_byte": 349, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.html" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.1.ts_0_2031
import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router, ParamMap} from '@angular/router'; import {Observable} from 'rxjs'; import {switchMap} from 'rxjs/operators'; import {CrisisService} from '../crisis.service'; import {Crisis} from '../crisis'; import {DialogService} from '../../dialog.serv...
{ "end_byte": 2031, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.1.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.ts_0_843
import {Component, OnInit} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {CrisisService} from '../crisis.service'; import {Crisis} from '../crisis'; import {Observable} from 'rxjs'; import {switchMap} from 'rxjs/operators'; @Component({ selector: 'app-crisis-list', templateUrl: './c...
{ "end_byte": 843, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.ts" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.css_0_960
/* CrisisListComponent's private CSS styles */ .crises { margin: 0 0 2em 0; list-style-type: none; padding: 0; } .crises li { position: relative; cursor: pointer; } .crises li:hover { left: 0.1em; } .crises a { color: black; text-decoration: none; display: block; background-color: #eee; margin:...
{ "end_byte": 960, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.css" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.html_0_267
<ul class="crises"> <li *ngFor="let crisis of crises$ | async" [class.selected]="crisis.id === selectedId"> <a [routerLink]="[crisis.id]"> <span class="badge">{{ crisis.id }}</span>{{ crisis.name }} </a> </li> </ul> <router-outlet></router-outlet>
{ "end_byte": 267, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.html" }
angular/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.1.ts_0_851
import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, ParamMap} from '@angular/router'; import {CrisisService} from '../crisis.service'; import {Crisis} from '../crisis'; import {Observable} from 'rxjs'; import {switchMap} from 'rxjs/operators'; @Component({ selector: 'app-crisis-list', templat...
{ "end_byte": 851, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.1.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin-routing.module.1.ts_0_988
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {AdminComponent} from './admin/admin.component'; import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component'; import {ManageCrisesComponent} from './manage-crises/ma...
{ "end_byte": 988, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-routing.module.1.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin.module.ts_0_677
// #docregion import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {AdminComponent} from './admin/admin.component'; import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component'; import {ManageCrisesComponent} from './manage-crises/manage-crises.component';...
{ "end_byte": 677, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin.module.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin-routing.module.ts_0_1042
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {AdminComponent} from './admin/admin.component'; import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component'; import {ManageCrisesComponent} from './manage-crises/ma...
{ "end_byte": 1042, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-routing.module.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin-routing.module.3.ts_0_1080
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import {AdminComponent} from './admin/admin.component'; import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component'; import {ManageCrisesComponent} from './manage-crises/ma...
{ "end_byte": 1080, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-routing.module.3.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin-routing.module.2.ts_0_1201
// #docplaster // #docregion import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; // #docregion admin-route import {authGuard} from '../auth/auth.guard'; import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component'; import {AdminComponent} from './admin/...
{ "end_byte": 1201, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-routing.module.2.ts" }
angular/adev/src/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.html_0_30
<p>Manage your heroes here</p>
{ "end_byte": 30, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.html" }
angular/adev/src/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.ts_0_261
// #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-manage-heroes', templateUrl: './manage-heroes.component.html', styleUrls: ['./manage-heroes.component.css'], standalone: false, }) export class ManageHeroesComponent {}
{ "end_byte": 261, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin/admin.component.ts_0_230
// #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-admin', templateUrl: './admin.component.html', styleUrls: ['./admin.component.css'], standalone: false, }) export class AdminComponent {}
{ "end_byte": 230, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin/admin.component.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin/admin.component.css_0_285
nav a { padding: 1rem; font-size: 1rem; background-color: #e8e8e8; color: #3d3d3d; } @media (min-width: 400px) { nav a { font-size: 1.2rem; } } nav a:hover { color: white; background-color: #42545C; } nav a.active { background-color: black; color: white; }
{ "end_byte": 285, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin/admin.component.css" }
angular/adev/src/content/examples/router/src/app/admin/admin/admin.component.html_0_398
<h2>Admin</h2> <nav> <a routerLink="./" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" ariaCurrentWhenActive="page">Dashboard</a> <a routerLink="./crises" routerLinkActive="active" ariaCurrentWhenActive="page">Manage Crises</a> <a routerLink="./heroes" routerLinkActive="active" ariaCurr...
{ "end_byte": 398, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin/admin.component.html" }
angular/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.html_0_206
<h3>Dashboard</h3> <p>Session ID: {{ sessionId | async }}</p> <div id="anchor"></div> <p>Token: {{ token | async }}</p> Preloaded Modules <ul> <li *ngFor="let module of modules">{{ module }}</li> </ul>
{ "end_byte": 206, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.html" }
angular/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.ts_0_831
// #docregion import {Component, OnInit} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {Observable} from 'rxjs'; import {map} from 'rxjs/operators'; @Component({ selector: 'app-admin-dashboard', templateUrl: './admin-dashboard.component.html', styleUrls: ['./admin-dashboard.compone...
{ "end_byte": 831, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.ts" }
angular/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.html_0_19
<h3>Dashboard</h3>
{ "end_byte": 19, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.html" }
angular/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.ts_0_1076
// #docregion import {Component, OnInit} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {Observable} from 'rxjs'; import {map} from 'rxjs/operators'; import {SelectivePreloadingStrategyService} from '../../selective-preloading-strategy.service'; @Component({ selector: 'app-admin-dashbo...
{ "end_byte": 1076, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.ts" }
angular/adev/src/content/examples/router/src/app/admin/manage-crises/manage-crises.component.ts_0_261
// #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-manage-crises', templateUrl: './manage-crises.component.html', styleUrls: ['./manage-crises.component.css'], standalone: false, }) export class ManageCrisesComponent {}
{ "end_byte": 261, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/manage-crises/manage-crises.component.ts" }
angular/adev/src/content/examples/router/src/app/admin/manage-crises/manage-crises.component.html_0_30
<p>Manage your crises here</p>
{ "end_byte": 30, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/admin/manage-crises/manage-crises.component.html" }
angular/adev/src/content/examples/router/src/app/compose-message/compose-message.component.ts_0_942
// #docregion import {Component} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; @Component({ selector: 'app-compose-message', templateUrl: './compose-message.component.html', styleUrls: ['./compose-message.component.css'], standalone: false, }) export class ComposeMessageComponen...
{ "end_byte": 942, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/compose-message/compose-message.component.ts" }
angular/adev/src/content/examples/router/src/app/compose-message/compose-message.component.css_0_95
textarea { width: 100%; margin-top: 1rem; font-size: 1.2rem; box-sizing: border-box; }
{ "end_byte": 95, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/compose-message/compose-message.component.css" }
angular/adev/src/content/examples/router/src/app/compose-message/compose-message.component.html_0_439
<!-- #docregion --> <h3>Contact Crisis Center</h3> <div *ngIf="details"> {{ details }} </div> <div> <div> <label for="message">Enter your message: </label> </div> <div> <textarea id="message" [(ngModel)]="message" rows="10" cols="35" [disabled]="sending"></textarea> </div> </div> <p *ngIf="!sending"> ...
{ "end_byte": 439, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/compose-message/compose-message.component.html" }
angular/adev/src/content/examples/router/src/app/crisis-list/crisis-list.component.1.ts_0_282
// Initial empty version // #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-crisis-list', templateUrl: './crisis-list.component.1.html', styleUrls: ['./crisis-list.component.1.css'], standalone: false, }) export class CrisisListComponent {}
{ "end_byte": 282, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-list/crisis-list.component.1.ts" }
angular/adev/src/content/examples/router/src/app/crisis-list/crisis-list.component.1.html_0_51
<h2>CRISIS CENTER</h2> <p>Get your crisis here</p>
{ "end_byte": 51, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/crisis-list/crisis-list.component.1.html" }
angular/adev/src/content/examples/router/src/app/hero-list/hero-list.component.1.html_0_176
<!-- #docregion template --> <h2>HEROES</h2> <p>Get your heroes here</p> <!-- #enddocregion template--> <button type="button" routerLink="/sidekicks">Go to sidekicks</button>
{ "end_byte": 176, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/hero-list/hero-list.component.1.html" }
angular/adev/src/content/examples/router/src/app/hero-list/hero-list.component.1.ts_0_249
// #docregion import {Component} from '@angular/core'; @Component({ selector: 'app-hero-list', templateUrl: './hero-list.component.1.html', styleUrls: ['./hero-list.component.1.css'], standalone: false, }) export class HeroListComponent {}
{ "end_byte": 249, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/router/src/app/hero-list/hero-list.component.1.ts" }
angular/adev/src/content/tutorials/home.md_0_800
# Tutorials Welcome to the Angular tutorials! These tutorials will guide you through the core concepts of the framework, and get you started building performant, scalable apps. <docs-card-container> <docs-card title="Learn Angular in your browser" link="Start coding" href="tutorials/learn-angular" imgSrc="adev/src/...
{ "end_byte": 800, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/home.md" }
angular/adev/src/content/tutorials/README.md_0_5610
# Angular embedded docs tutorial - [Tutorial files](#tutorial-files) - [Tutorials directory structure](#tutorials-directory-structure) - [Reserved tutorials directories](#reserved-tutorials-directories) ## Tutorial files The tutorials content consists of the tutorial content, source code and configuration. ### Cont...
{ "end_byte": 5610, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/README.md" }
angular/adev/src/content/tutorials/BUILD.bazel_0_469
load("//adev/shared-docs:index.bzl", "generate_guides") generate_guides( name = "tutorials", srcs = glob( [ "*.md", ], exclude = [ "README.md", ], ), data = [ "//adev/src/assets/images:ang_illustrations-04.svg", "//adev/src/assets/...
{ "end_byte": 469, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/BUILD.bazel" }
angular/adev/src/content/tutorials/homepage/BUILD.bazel_0_273
load("//adev/shared-docs:index.bzl", "generate_playground") package(default_visibility = ["//adev:__subpackages__"]) filegroup( name = "files", srcs = glob( ["**/*"], ), ) generate_playground( name = "homepage", playground_srcs = ":files", )
{ "end_byte": 273, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/homepage/BUILD.bazel" }
angular/adev/src/content/tutorials/homepage/idx/dev.nix_0_1086
# To learn more about how to use Nix to configure your environment # see: https://developers.google.com/idx/guides/customize-idx-env { pkgs, ... }: { # Which nixpkgs channel to use. channel = "stable-23.11"; # or "unstable" # Use https://search.nixos.org/packages to find packages packages = [ pkgs.nodejs_18...
{ "end_byte": 1086, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/homepage/idx/dev.nix" }
angular/adev/src/content/tutorials/homepage/src/main.ts_0_502
import {Component} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {bootstrapApplication} from '@angular/platform-browser'; @Component({ selector: 'app-root', standalone: true, template: ` <label for="name">Name:</label> <input type="text" id="name" [(ngModel)]="name" placeholder...
{ "end_byte": 502, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/homepage/src/main.ts" }
angular/adev/src/content/tutorials/playground/BUILD.bazel_0_260
load("//adev/shared-docs:index.bzl", "generate_playground") package(default_visibility = ["//adev:__subpackages__"]) filegroup( name = "files", srcs = glob(["**/*"]), ) generate_playground( name = "playground", playground_srcs = ":files", )
{ "end_byte": 260, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/BUILD.bazel" }
angular/adev/src/content/tutorials/playground/1-signals/src/main.ts_0_872
import {Component, signal, computed} from '@angular/core'; import {bootstrapApplication} from '@angular/platform-browser'; @Component({ selector: 'app-root', standalone: true, template: ` <h2>Cookie recipe</h2> <label> # of cookies: <input type="range" min="10" max="100" step="10" [value]="c...
{ "end_byte": 872, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/1-signals/src/main.ts" }
angular/adev/src/content/tutorials/playground/2-control-flow/src/main.ts_0_822
import {Component} from '@angular/core'; import {bootstrapApplication} from '@angular/platform-browser'; @Component({ selector: 'app-root', standalone: true, template: ` <h2>Todos</h2> <input #text /> <button (click)="add(text.value)">Add</button> @for (todo of todos; track $index) { <p> ...
{ "end_byte": 822, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/2-control-flow/src/main.ts" }
angular/adev/src/content/tutorials/playground/3-minigame/src/main.ts_0_6942
import {A11yModule} from '@angular/cdk/a11y'; import {CommonModule} from '@angular/common'; import {Component, ElementRef, ViewChild, computed, signal} from '@angular/core'; import {MatSlideToggleChange, MatSlideToggleModule} from '@angular/material/slide-toggle'; import {bootstrapApplication} from '@angular/platform-b...
{ "end_byte": 6942, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/3-minigame/src/main.ts" }
angular/adev/src/content/tutorials/playground/3-minigame/src/styles.css_0_694
/* You can add global styles to this file, and also import other style files */ @import "@angular/material/prebuilt-themes/indigo-pink.css"; * { margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: 'Be Vietnam Pro', sans-serif; } :root { --bright-blue: oklch(51.01% 0.274 263.83); --...
{ "end_byte": 694, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/3-minigame/src/styles.css" }
angular/adev/src/content/tutorials/playground/3-minigame/src/game.css_0_5441
.wrapper { height: 100%; width: 100%; max-width: 1000px; margin: auto; display: flex; justify-content: flex-end; align-items: center; } .col { width: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center; } .overall-stats { display: flex; flex-dir...
{ "end_byte": 5441, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/3-minigame/src/game.css" }
angular/adev/src/content/tutorials/playground/3-minigame/src/game.html_0_4971
<div class="wrapper"> <div class="col"> <h1>Goal: {{ goal() }}º</h1> <div id="quote" [class.show]="rotateVal() >= 74">"{{ updatedInteractions().quote }}"</div> <div id="angle" (mouseup)="stopDragging()" (mouseleave)="stopDragging()" (mousemove)="mouseMove($event)" (touchmove)...
{ "end_byte": 4971, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/3-minigame/src/game.html" }
angular/adev/src/content/tutorials/playground/3-minigame/src/game.html_4976_9162
dialog id="result" cdkTrapFocus> <button id="close" (click)="close()">X</button> <div class="result-stats"> <h2>goal: {{ goal() }}º</h2> <h2>actual: {{ rotateVal() | number : '1.1-1' }}º</h2> </div> <h2 class="accuracy"> <span>{{ animatedAccuracy() | number : '1.1-1' }}%<...
{ "end_byte": 9162, "start_byte": 4976, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/3-minigame/src/game.html" }
angular/adev/src/content/tutorials/playground/3-minigame/src/assets/share.svg_0_269
<svg width="300" height="300.251" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path fill="#000" d="M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66"/> </svg>
{ "end_byte": 269, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/3-minigame/src/assets/share.svg" }
angular/adev/src/content/tutorials/playground/common/idx/dev.nix_0_1086
# To learn more about how to use Nix to configure your environment # see: https://developers.google.com/idx/guides/customize-idx-env { pkgs, ... }: { # Which nixpkgs channel to use. channel = "stable-23.11"; # or "unstable" # Use https://search.nixos.org/packages to find packages packages = [ pkgs.nodejs_18...
{ "end_byte": 1086, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/common/idx/dev.nix" }
angular/adev/src/content/tutorials/playground/0-hello-world/src/main.ts_0_282
import {Component} from '@angular/core'; import {bootstrapApplication} from '@angular/platform-browser'; @Component({ selector: 'app-root', standalone: true, template: ` Hello world! `, }) export class PlaygroundComponent {} bootstrapApplication(PlaygroundComponent);
{ "end_byte": 282, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/playground/0-hello-world/src/main.ts" }
angular/adev/src/content/tutorials/first-app/BUILD.bazel_0_437
load("//adev/shared-docs:index.bzl", "generate_guides", "generate_tutorial") package(default_visibility = ["//adev:__subpackages__"]) generate_guides( name = "first-app-guides", srcs = glob(["**/*.md"]), data = [ ":files", ], ) filegroup( name = "files", srcs = glob( ["**/*"],...
{ "end_byte": 437, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/first-app/BUILD.bazel" }
angular/adev/src/content/tutorials/first-app/intro/README.md_0_3673
# Build your first Angular app This tutorial consists of lessons that introduce the Angular concepts you need to know to start coding in Angular. You can do as many or as few as you would like and you can do them in any order. HELPFUL: Prefer video? We also have a full [YouTube course](https://youtube.com/playlist?l...
{ "end_byte": 3673, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/first-app/intro/README.md" }
angular/adev/src/content/tutorials/first-app/common/idx/dev.nix_0_1086
# To learn more about how to use Nix to configure your environment # see: https://developers.google.com/idx/guides/customize-idx-env { pkgs, ... }: { # Which nixpkgs channel to use. channel = "stable-23.11"; # or "unstable" # Use https://search.nixos.org/packages to find packages packages = [ pkgs.nodejs_18...
{ "end_byte": 1086, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/first-app/common/idx/dev.nix" }
angular/adev/src/content/tutorials/first-app/steps/02-HomeComponent/README.md_0_5867
# Create Home component This tutorial lesson demonstrates how to create a new [component](guide/components) for your Angular app. <docs-video src="https://www.youtube.com/embed/R0nRX8jD2D0?si=OMVaw71EIa44yIOJ"/> ## What you'll learn Your app has a new component: `HomeComponent`. ## Conceptual preview of Angular co...
{ "end_byte": 5867, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/first-app/steps/02-HomeComponent/README.md" }
angular/adev/src/content/tutorials/first-app/steps/02-HomeComponent/src/index.html_0_427
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Homes</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,40...
{ "end_byte": 427, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/adev/src/content/tutorials/first-app/steps/02-HomeComponent/src/index.html" }