_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/adev/src/content/examples/structural-directives/e2e/src/app.e2e-spec.ts_0_1838 | import {browser, element, by} from 'protractor';
describe('Structural Directives', () => {
beforeAll(() => browser.get(''));
it('first div should show hero name with *ngIf', async () => {
const allDivs = element.all(by.tagName('div'));
expect(await allDivs.get(0).getText()).toEqual('Dr. Nice');
});
i... | {
"end_byte": 1838,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/structural-directives/src/index.html_0_296 | <!DOCTYPE html>
<!-- #docregion -->
<html lang="en">
<head>
<title>Angular Structural Directives</title>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<app-root></app-root>
</body>
</html>
| {
"end_byte": 296,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/index.html"
} |
angular/adev/src/content/examples/structural-directives/src/main.ts_0_275 | import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
bootstrapApplication(AppComponent, {
providers: [provideProtractorTestingSupport()],
}).catch((err) => console.error(err));
| {
"end_byte": 275,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/main.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/app.component.html_0_6108 | <!-- #docplaster -->
<!-- #docregion -->
<h1>Structural Directives</h1>
<p>Conditional display of hero</p>
<blockquote>
<!-- #docregion asterisk -->
<div *ngIf="hero" class="name">{{hero.name}}</div>
<!-- #enddocregion asterisk -->
</blockquote>
<p>List of heroes</p>
<ul>
<li *ngFor="let hero of heroes">{{hero.na... | {
"end_byte": 6108,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/app.component.html"
} |
angular/adev/src/content/examples/structural-directives/src/app/hero.ts_0_298 | // #docregion
export interface Hero {
id: number;
name: string;
emotion?: string;
}
export const heroes: Hero[] = [
{id: 1, name: 'Dr. Nice', emotion: 'happy'},
{id: 2, name: 'RubberMan', emotion: 'sad'},
{id: 3, name: 'Windstorm', emotion: 'confused'},
{id: 4, name: 'Magneta'},
];
| {
"end_byte": 298,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/hero.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/hero.component.ts_0_669 | import {Component} from '@angular/core';
import {CommonModule} from '@angular/common';
import {IfLoadedDirective} from './if-loaded.directive';
import {LoadingState} from './loading-state';
import {Hero, heroes} from './hero';
@Component({
standalone: true,
selector: 'app-hero',
template: `
<button (click)... | {
"end_byte": 669,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/hero.component.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/unless.directive.ts_0_1411 | // #docplaster
// #docregion
// #docregion no-docs, skeleton
import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';
// #enddocregion skeleton
/**
* Add the template content to the DOM unless the condition is true.
// #enddocregion no-docs
*
* If the expression assigned to `appUnless` evaluat... | {
"end_byte": 1411,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/unless.directive.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/hero-switch.components.ts_0_1127 | // #docregion
import {Component, Input} from '@angular/core';
import {Hero} from './hero';
@Component({
standalone: true,
selector: 'app-happy-hero',
template: 'Wow. You like {{hero.name}}. What a happy hero ... just like you.',
})
export class HappyHeroComponent {
@Input() hero!: Hero;
}
@Component({
stand... | {
"end_byte": 1127,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/hero-switch.components.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/app.component.ts_0_979 | import {Component} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {heroSwitchComponents} from './hero-switch.components';
import {HeroComponent} from './hero.component';
import {UnlessDirective} from './unless.directive';
import {TrigonometryDirec... | {
"end_byte": 979,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/app.component.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/loading-state.ts_0_145 | export type Loaded<T> = {type: 'loaded'; data: T};
export type Loading = {type: 'loading'};
export type LoadingState<T> = Loaded<T> | Loading;
| {
"end_byte": 145,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/loading-state.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/scrap.txt_0_744 | // interesting but unused code
heroChooser(picker: HTMLFieldSetElement) {
let choices = picker.children;
this.favoriteHero = undefined;
for (let i = 0; i < choices.length; i++) {
let choice = choices[i].children[0] as HTMLInputElement;
if (choice.checked) { this.favoriteHero = this.heroes[i]; ... | {
"end_byte": 744,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/scrap.txt"
} |
angular/adev/src/content/examples/structural-directives/src/app/app.component.css_0_862 | /* #docregion */
button {
min-width: 100px;
font-size: 100%;
}
.box {
border: 1px solid gray;
max-width: 600px;
padding: 4px;
}
.choices {
font-style: italic;
}
code, .code {
background-color: #eee;
color: black;
font-family: Courier, sans-serif;
font-size: 85%;
}
div.code {
width: 400px;
}
.h... | {
"end_byte": 862,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/app.component.css"
} |
angular/adev/src/content/examples/structural-directives/src/app/trigonometry.directive.ts_0_1278 | import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';
@Directive({
standalone: true,
selector: '[appTrigonometry]',
})
export class TrigonometryDirective {
private isViewCreated = false;
private readonly context = new TrigonometryContext();
@Input('appTrigonometry') set angle(angleI... | {
"end_byte": 1278,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/trigonometry.directive.ts"
} |
angular/adev/src/content/examples/structural-directives/src/app/if-loaded.directive.ts_0_918 | import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';
import {Loaded, LoadingState} from './loading-state';
@Directive({
standalone: true,
selector: '[appIfLoaded]',
})
export class IfLoadedDirective<T> {
private isViewCreated = false;
@Input('appIfLoaded') set state(state: LoadingSt... | {
"end_byte": 918,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/structural-directives/src/app/if-loaded.directive.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/BUILD.bazel_0_105 | package(default_visibility = ["//visibility:public"])
exports_files(["src/app/self/self.component.ts"])
| {
"end_byte": 105,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/BUILD.bazel"
} |
angular/adev/src/content/examples/resolution-modifiers/e2e/src/app.e2e-spec.ts_0_537 | import {browser, element, by} from 'protractor';
describe('Resolution-modifiers-example', () => {
beforeAll(() => browser.get(''));
it('shows basic flower emoji', async () => {
expect(await element.all(by.css('p')).get(0).getText()).toContain('🌸');
});
it('shows basic leaf emoji', async () => {
expe... | {
"end_byte": 537,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/index.html_0_327 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>DI Resolution Modifiers Example</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root>Loading...</app-root>
</body>
<... | {
"end_byte": 327,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/index.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/main.ts_0_204 | import {bootstrapApplication} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
import appConfig from './app/app.config';
bootstrapApplication(AppComponent, appConfig);
| {
"end_byte": 204,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/main.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/app.component.html_0_287 | <h1>DI resolution modifiers</h1>
<p>Basic flower service: {{ flower.emoji }}</p>
<p>Basic leaf service: {{ leaf.emoji }}</p>
<app-optional></app-optional>
<app-self></app-self>
<app-self-no-data></app-self-no-data>
<app-skipself></app-skipself>
<app-host-parent></app-host-parent>
| {
"end_byte": 287,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/app.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/leaf.service.ts_0_184 | import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root',
})
// #docregion leafservice
export class LeafService {
emoji = '🌿';
}
// #enddocregion leafservice
| {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/leaf.service.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/app.component.ts_0_1037 | import {Component} from '@angular/core';
import {LeafService} from './leaf.service';
import {FlowerService} from './flower.service';
import {HostComponent} from './host/host.component';
import {OptionalComponent} from './optional/optional.component';
import {SelfComponent} from './self/self.component';
import {HostPare... | {
"end_byte": 1037,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/app.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/optional.service.ts_0_131 | import {Injectable} from '@angular/core';
@Injectable()
export class OptionalService {}
// This service isn't provided anywhere.
| {
"end_byte": 131,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/optional.service.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/app.config.ts_0_288 | import {ApplicationConfig} from '@angular/core';
import {provideProtractorTestingSupport} from '@angular/platform-browser';
const appConfig: ApplicationConfig = {
providers: [
provideProtractorTestingSupport(), //only needed for docs e2e testing
],
};
export default appConfig;
| {
"end_byte": 288,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/app.config.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/flower.service.ts_0_182 | import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root', // provide this service in the root ModuleInjector
})
export class FlowerService {
emoji = '🌸';
}
| {
"end_byte": 182,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/flower.service.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.html_0_124 | <div class="section">
<h2>@Self() Component (without a provider)</h2>
<p>Leaf emoji: {{ leaf?.emoji }}</p>
</div>
| {
"end_byte": 124,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.ts_0_572 | import {Component, Self, Optional} from '@angular/core';
import {LeafService} from '../leaf.service';
// #docregion self-no-data-component
@Component({
standalone: true,
selector: 'app-self-no-data',
templateUrl: './self-no-data.component.html',
styleUrls: ['./self-no-data.component.css'],
})
export class Self... | {
"end_byte": 572,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host/host.component.ts_0_748 | import {Component, Host, Optional} from '@angular/core';
import {FlowerService} from '../flower.service';
import {HostChildComponent} from '../host-child/host-child.component';
// #docregion host-component
@Component({
standalone: true,
selector: 'app-host',
templateUrl: './host.component.html',
styleUrls: ['.... | {
"end_byte": 748,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host/host.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host/host.component.html_0_187 | <div class="section">
<h2>@Host() Component</h2>
<p>Flower emoji: {{ flower?.emoji }}</p>
<p><i>(@Host() stops it here)</i></p>
<app-host-child></app-host-child>
</div>
| {
"end_byte": 187,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host/host.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host/host.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host/host.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host-child/host-child.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host-child/host-child.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host-child/host-child.component.html_0_115 | <div class="section">
<h2>Child of @Host() Component</h2>
<p>Flower emoji: {{ flower.emoji }}</p>
</div>
| {
"end_byte": 115,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host-child/host-child.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host-child/host-child.component.ts_0_331 | import {Component} from '@angular/core';
import {FlowerService} from '../flower.service';
@Component({
standalone: true,
selector: 'app-host-child',
templateUrl: './host-child.component.html',
styleUrls: ['./host-child.component.css'],
})
export class HostChildComponent {
constructor(public flower: FlowerSer... | {
"end_byte": 331,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host-child/host-child.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/optional/optional.component.html_0_328 | <div class="section">
<h2>@Optional() Component</h2>
<p>This component still works even though the OptionalService (notice @Optional() in the constructor isn't provided or configured anywhere. Angular goes through tree and visibility rules, and if it doesn't find the requested service, returns null.</p>... | {
"end_byte": 328,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/optional/optional.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/optional/optional.component.ts_0_603 | import {Component, Optional} from '@angular/core';
import {OptionalService} from '../optional.service';
@Component({
standalone: true,
selector: 'app-optional',
templateUrl: './optional.component.html',
styleUrls: ['./optional.component.css'],
})
// #docregion optional-component
export class OptionalComponent... | {
"end_byte": 603,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/optional/optional.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/optional/optional.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/optional/optional.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/self/self.component.ts_0_566 | import {Component, Self} from '@angular/core';
import {FlowerService} from '../flower.service';
// #docregion self-component
@Component({
standalone: true,
selector: 'app-self',
templateUrl: './self.component.html',
styleUrls: ['./self.component.css'],
providers: [{provide: FlowerService, useValue: {emoji: '... | {
"end_byte": 566,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/self/self.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/self/self.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/self/self.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/self/self.component.html_0_106 | <div class="section">
<h2>@Self() Component</h2>
<p>Flower emoji: {{ flower.emoji }}</p>
</div>
| {
"end_byte": 106,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/self/self.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/skipself/skipself.component.html_0_106 | <div class="section">
<h2>@SkipSelf() Component</h2>
<p>Leaf emoji: {{ leaf.emoji }}</p>
</div>
| {
"end_byte": 106,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/skipself/skipself.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/skipself/skipself.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/skipself/skipself.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/skipself/skipself.component.ts_0_672 | import {Component, SkipSelf} from '@angular/core';
import {LeafService} from '../leaf.service';
// #docregion skipself-component
@Component({
standalone: true,
selector: 'app-skipself',
templateUrl: './skipself.component.html',
styleUrls: ['./skipself.component.css'],
// Angular would ignore this LeafService... | {
"end_byte": 672,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/skipself/skipself.component.ts"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.css_0_74 | .section {
border: 2px solid #369;
padding: 1rem;
margin: 1rem 0;
}
| {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.css"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.html_0_138 | <div class="section">
<h2>Parent of @Host() Component</h2>
<p>Flower emoji: {{ flower.emoji }}</p>
<app-host></app-host>
</div>
| {
"end_byte": 138,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.html"
} |
angular/adev/src/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.ts_0_485 | import {Component} from '@angular/core';
import {FlowerService} from '../flower.service';
import {HostComponent} from '../host/host.component';
@Component({
standalone: true,
selector: 'app-host-parent',
templateUrl: './host-parent.component.html',
styleUrls: ['./host-parent.component.css'],
providers: [{pro... | {
"end_byte": 485,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.ts"
} |
angular/adev/src/content/examples/angular-compiler-options/BUILD.bazel_0_120 | package(default_visibility = ["//visibility:public"])
exports_files([
"tsconfig.app.json",
"tsconfig.json",
])
| {
"end_byte": 120,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/BUILD.bazel"
} |
angular/adev/src/content/examples/angular-compiler-options/e2e/src/app.e2e-spec.ts_0_538 | import {AppPage} from './app.po';
import {browser, logging} from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
// Add your e2e tests here
afterEach(async () => {
// Assert that there are no errors emitted from the browser
... | {
"end_byte": 538,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/angular-compiler-options/src/index.html_0_295 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ponyracer</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
| {
"end_byte": 295,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/src/index.html"
} |
angular/adev/src/content/examples/angular-compiler-options/src/main.ts_0_275 | import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
bootstrapApplication(AppComponent, {
providers: [provideProtractorTestingSupport()],
}).catch((err) => console.error(err));
| {
"end_byte": 275,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/src/main.ts"
} |
angular/adev/src/content/examples/angular-compiler-options/src/app/app.component.html_0_64 | <h1>Replace the src folder in this {{ title }} with yours.</h1>
| {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/src/app/app.component.html"
} |
angular/adev/src/content/examples/angular-compiler-options/src/app/app.component.spec.ts_0_479 | import {TestBed} from '@angular/core/testing';
import {AppComponent} from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AppComponent],
}).compileComponents();
});
it('should create the app', () => {
const fixt... | {
"end_byte": 479,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/src/app/app.component.spec.ts"
} |
angular/adev/src/content/examples/angular-compiler-options/src/app/app.component.ts_0_230 | import {Component} from '@angular/core';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
title = 'example';
}
| {
"end_byte": 230,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/angular-compiler-options/src/app/app.component.ts"
} |
angular/adev/src/content/examples/attribute-directives/BUILD.bazel_0_448 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/app.component.1.html",
"src/app/app.component.1.ts",
"src/app/app.component.avoid.html",
"src/app/app.component.html",
"src/app/app.component.ts",
"src/app/highlight.directive.0.ts",
"src/app/highlight.directive.... | {
"end_byte": 448,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/BUILD.bazel"
} |
angular/adev/src/content/examples/attribute-directives/e2e/src/app.e2e-spec.ts_0_1027 | import {browser, element, by} from 'protractor';
describe('Attribute directives', () => {
const title = 'My First Attribute Directive';
beforeAll(() => browser.get(''));
it(`should display correct title: ${title}`, async () => {
expect(await element(by.css('h1')).getText()).toEqual(title);
});
it('sho... | {
"end_byte": 1027,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/index.html_0_285 | <!-- #docregion -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Attribute Directives</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<app-root></app-root>
</body>
</html>
| {
"end_byte": 285,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/index.html"
} |
angular/adev/src/content/examples/attribute-directives/src/main.ts_0_289 | // #docregion
import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
bootstrapApplication(AppComponent, {
providers: [provideProtractorTestingSupport()],
}).catch((err) => console.error(err));
| {
"end_byte": 289,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/main.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/app.component.html_0_1204 | <!-- #docregion v2, -->
<h1>My First Attribute Directive</h1>
<h2>Pick a highlight color</h2>
<div>
<input type="radio" name="colors" (click)="color='lightgreen'">Green
<input type="radio" name="colors" (click)="color='yellow'">Yellow
<input type="radio" name="colors" (click)="color='cyan'">Cyan
</div>
<!-- #doc... | {
"end_byte": 1204,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/app.component.html"
} |
angular/adev/src/content/examples/attribute-directives/src/app/highlight.directive.3.ts_0_678 | // #docregion, imports
import {Directive, ElementRef, HostListener, Input} from '@angular/core';
// #enddocregion imports
@Directive({
standalone: true,
selector: '[appHighlight]',
})
export class HighlightDirective {
constructor(private el: ElementRef) {}
// #docregion input
@Input() appHighlight = '';
/... | {
"end_byte": 678,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/highlight.directive.3.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/highlight.directive.ts_0_696 | import {Directive, ElementRef, HostListener, Input} from '@angular/core';
@Directive({
standalone: true,
selector: '[appHighlight]',
})
export class HighlightDirective {
constructor(private el: ElementRef) {}
// #docregion defaultColor
@Input() defaultColor = '';
// #enddocregion defaultColor
@Input() ... | {
"end_byte": 696,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/highlight.directive.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/app.component.1.ts_0_304 | import {Component} from '@angular/core';
import {HighlightDirective} from './highlight.directive';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.1.html',
imports: [HighlightDirective],
})
// #docregion class
export class AppComponent {
color = 'yellow';
}
| {
"end_byte": 304,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/app.component.1.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/highlight.directive.2.ts_0_661 | // #docplaster
// #docregion imports
import {Directive, ElementRef, HostListener} from '@angular/core';
// #enddocregion imports
import {Input} from '@angular/core';
// #docregion
@Directive({
standalone: true,
selector: '[appHighlight]',
})
export class HighlightDirective {
constructor(private el: ElementRef) {... | {
"end_byte": 661,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/highlight.directive.2.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/app.component.avoid.html_0_104 | <!-- #docregion unsupported -->
<p app:Highlight>This is invalid</p>
<!-- #enddocregion unsupported --> | {
"end_byte": 104,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/app.component.avoid.html"
} |
angular/adev/src/content/examples/attribute-directives/src/app/app.component.ts_0_310 | // #docregion
import {Component} from '@angular/core';
import {HighlightDirective} from './highlight.directive';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
imports: [HighlightDirective],
})
// #docregion class
export class AppComponent {
color = '';
}
| {
"end_byte": 310,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/app.component.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/highlight.directive.1.ts_0_274 | // #docregion
import {Directive, ElementRef} from '@angular/core';
@Directive({
standalone: true,
selector: '[appHighlight]',
})
export class HighlightDirective {
constructor(private el: ElementRef) {
this.el.nativeElement.style.backgroundColor = 'yellow';
}
}
| {
"end_byte": 274,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/highlight.directive.1.ts"
} |
angular/adev/src/content/examples/attribute-directives/src/app/app.component.1.html_0_332 | <!-- #docregion -->
<h1>My First Attribute Directive</h1>
<!-- #docregion applied -->
<p appHighlight>Highlight me!</p>
<!-- #enddocregion applied -->
<p appHighlight="yellow">Highlighted in yellow</p>
<p [appHighlight]="'orange'">Highlighted in orange</p>
<p [appHighlight]="color">Highlighted with parent component'... | {
"end_byte": 332,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/app.component.1.html"
} |
angular/adev/src/content/examples/attribute-directives/src/app/highlight.directive.0.ts_0_157 | // #docregion
import {Directive} from '@angular/core';
@Directive({
standalone: true,
selector: '[appHighlight]',
})
export class HighlightDirective {}
| {
"end_byte": 157,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/attribute-directives/src/app/highlight.directive.0.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/BUILD.bazel_0_247 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/check-for-update.service.ts",
"src/app/handle-unrecoverable-state.service.ts",
"src/app/log-update.service.ts",
"src/app/prompt-update.service.ts",
])
| {
"end_byte": 247,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/BUILD.bazel"
} |
angular/adev/src/content/examples/service-worker-getting-started/e2e/src/app.e2e-spec.ts_0_1492 | import {AppPage} from './app.po';
import {element, by} from 'protractor';
describe('sw-example App', () => {
let page: AppPage;
beforeEach(async () => {
page = new AppPage();
await page.navigateTo();
});
it('should display welcome message', async () => {
expect(await page.getTitleText()).toEqual(... | {
"end_byte": 1492,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/index.html_0_166 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SwExample</title>
<base href="/">
</head>
<body>
<app-root></app-root>
</body>
</html>
| {
"end_byte": 166,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/index.html"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/main.ts_0_278 | import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
bootstrapApplication(AppComponent, {
providers: [
provideProtractorTestingSupport(), // essential for e2e testing
],
});
| {
"end_byte": 278,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/main.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/app.component.html_0_1304 | <!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNE... | {
"end_byte": 1304,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/app.component.html"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts_0_979 | import {ApplicationRef, Injectable} from '@angular/core';
import {SwUpdate} from '@angular/service-worker';
import {concat, interval} from 'rxjs';
import {first} from 'rxjs/operators';
@Injectable({providedIn: 'root'})
export class CheckForUpdateService {
constructor(appRef: ApplicationRef, updates: SwUpdate) {
... | {
"end_byte": 979,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/handle-unrecoverable-state.service.ts_0_550 | import {Injectable} from '@angular/core';
import {SwUpdate} from '@angular/service-worker';
function notifyUser(message: string): void {}
// #docregion sw-unrecoverable-state
@Injectable({providedIn: 'root'})
export class HandleUnrecoverableStateService {
constructor(updates: SwUpdate) {
updates.unrecoverable.s... | {
"end_byte": 550,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/handle-unrecoverable-state.service.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/app.component.ts_0_518 | import {Component} from '@angular/core';
import {SwUpdate} from '@angular/service-worker';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent {
title = 'Service Workers';
updateCheckText = '';
constructor(private update: SwUpdate) {}
u... | {
"end_byte": 518,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/app.component.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/readme.md_0_352 | # Instructions for Angular Universal Example Download
This is the downloaded sample code for the [Angular Universal (Standalone) guide](https://angular.dev/guide/ssr).
## Install and Run
1. `npm install` to install the `node_module` packages
2. `npm run dev:ssr` to launch the server and application
3. Launch the bro... | {
"end_byte": 352,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/readme.md"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/log-update.service.ts_0_842 | import {Injectable} from '@angular/core';
import {SwUpdate, VersionReadyEvent} from '@angular/service-worker';
// #docregion sw-update
@Injectable({providedIn: 'root'})
export class LogUpdateService {
constructor(updates: SwUpdate) {
updates.versionUpdates.subscribe((evt) => {
switch (evt.type) {
c... | {
"end_byte": 842,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/log-update.service.ts"
} |
angular/adev/src/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts_0_1247 | // #docplaster
import {Injectable} from '@angular/core';
// #docregion sw-replicate-available
import {filter, map} from 'rxjs/operators';
// #enddocregion sw-replicate-available
import {SwUpdate, VersionReadyEvent} from '@angular/service-worker';
function promptUser(event: VersionReadyEvent): boolean {
return true;
... | {
"end_byte": 1247,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts"
} |
angular/adev/src/content/examples/errors/BUILD.bazel_0_30 | exports_files(glob(["**/*"]))
| {
"end_byte": 30,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/errors/BUILD.bazel"
} |
angular/adev/src/content/examples/errors/cyclic-imports/parent.component.ts_0_243 | import {Component} from '@angular/core';
import {ChildComponent} from './child.component';
@Component({
standalone: true,
selector: 'app-parent',
imports: [ChildComponent],
template: '<app-child/>',
})
export class ParentComponent {}
| {
"end_byte": 243,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/errors/cyclic-imports/parent.component.ts"
} |
angular/adev/src/content/examples/errors/cyclic-imports/child.component.ts_0_263 | import {Component} from '@angular/core';
import {ParentComponent} from './parent.component';
@Component({
standalone: true,
selector: 'app-child',
template: 'The child!',
})
export class ChildComponent {
constructor(private parent: ParentComponent) {}
}
| {
"end_byte": 263,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/errors/cyclic-imports/child.component.ts"
} |
angular/adev/src/content/examples/i18n/readme.md_0_869 | # Angular i18n Internationalization Example
This sample comes from the Angular documentation's "[Example Angular Internationalization application](https://angular.dev/guide/i18n/example)" page.
## Install and Run the Download
1. `npm install` the node_module packages
2. `npm start` to see it run in English
3. `npm r... | {
"end_byte": 869,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/readme.md"
} |
angular/adev/src/content/examples/i18n/BUILD.bazel_0_448 | package(default_visibility = ["//visibility:public"])
exports_files([
"angular.json",
"doc-files/apache2.conf",
"doc-files/app.component.html",
"doc-files/commands.sh",
"doc-files/locale_plural_function.ts",
"doc-files/main.1.ts",
"doc-files/messages.fr.xlf.html",
"doc-files/nginx.conf"... | {
"end_byte": 448,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/BUILD.bazel"
} |
angular/adev/src/content/examples/i18n/doc-files/app.component.html_0_1266 | <!--#docregion greeting-->
<h1>Hello i18n!</h1>
<!--#enddocregion greeting-->
<!--#docregion i18n-attribute-->
<h1 i18n>Hello i18n!</h1>
<!--#enddocregion i18n-attribute-->
<!--#docregion i18n-attribute-desc-->
<h1 i18n="An introduction header for this sample">Hello i18n!</h1>
<!--#enddocregion i18n-attribute-desc-->... | {
"end_byte": 1266,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/app.component.html"
} |
angular/adev/src/content/examples/i18n/doc-files/messages.fr.xlf.html_0_4554 | <!-- The `messages.fr.xlf` after translation for documentation purposes -->
<!-- #docregion -->
<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="ng2.template">
<body>
<!-- #docregion translat... | {
"end_byte": 4554,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/messages.fr.xlf.html"
} |
angular/adev/src/content/examples/i18n/doc-files/commands.sh_0_901 | # #docregion add-localize
ng add @angular/localize
# #enddocregion add-localize
# #docregion extract-i18n-default
ng extract-i18n
# #enddocregion extract-i18n-default
# #docregion extract-i18n-output-path
ng extract-i18n --output-path src/locale
# #enddocregion extract-i18n-output-path
# #docregion extract-i18n-form... | {
"end_byte": 901,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/commands.sh"
} |
angular/adev/src/content/examples/i18n/doc-files/app.module.ts_0_400 | // For documenting NgModule Apps only
// #docregion
import {LOCALE_ID, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from '../src/app/app.component';
@NgModule({
imports: [BrowserModule],
declarations: [AppComponent],
providers: [{provide: LOCALE_... | {
"end_byte": 400,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/app.module.ts"
} |
angular/adev/src/content/examples/i18n/doc-files/app.locale_data_extra.ts_0_220 | import {registerLocaleData} from '@angular/common';
import localeFrExtra from '@angular/common/locales/extra/fr';
import localeFr from '@angular/common/locales/fr';
registerLocaleData(localeFr, 'fr-FR', localeFrExtra);
| {
"end_byte": 220,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/app.locale_data_extra.ts"
} |
angular/adev/src/content/examples/i18n/doc-files/main.1.ts_0_151 | import {bootstrapApplication} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
bootstrapApplication(AppComponent);
| {
"end_byte": 151,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/main.1.ts"
} |
angular/adev/src/content/examples/i18n/doc-files/app.locale_data.ts_0_187 | import {registerLocaleData} from '@angular/common';
import localeFr from '@angular/common/locales/fr';
// the second parameter 'fr-FR' is optional
registerLocaleData(localeFr, 'fr-FR');
| {
"end_byte": 187,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/app.locale_data.ts"
} |
angular/adev/src/content/examples/i18n/doc-files/rendered-output.html_0_44 | <h3>Bonjour</h3>
<!-- ... -->
<p>Bonjour</p> | {
"end_byte": 44,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/rendered-output.html"
} |
angular/adev/src/content/examples/i18n/doc-files/locale_plural_function.ts_0_212 | /* eslint-disable */
// #docregion
function plural(n: number): number {
let i = Math.floor(Math.abs(n)),
v = n.toString().replace(/^[^.]*\.?/, '').length;
if (i === 1 && v === 0) return 1;
return 5;
}
| {
"end_byte": 212,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/doc-files/locale_plural_function.ts"
} |
angular/adev/src/content/examples/i18n/e2e/src/app.e2e-spec.ts_0_1696 | import {browser, element, by} from 'protractor';
describe('i18n E2E Tests', () => {
beforeEach(() => browser.get(''));
it('should display i18n translated welcome: Bonjour !', async () => {
expect(await element(by.css('h1')).getText()).toEqual('Bonjour i18n !');
});
it('should display the node texts witho... | {
"end_byte": 1696,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/i18n/src/index.html_0_318 | <!-- #docregion -->
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<title>Angular i18n example</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
<!-- #enddocregion -->
| {
"end_byte": 318,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/src/index.html"
} |
angular/adev/src/content/examples/i18n/src/main.ts_0_423 | // #docregion global-locale
import '@angular/common/locales/global/fr';
// #enddocregion global-locale
import {provideProtractorTestingSupport} from '@angular/platform-browser';
import {bootstrapApplication} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
bootstrapApplication(AppCo... | {
"end_byte": 423,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/src/main.ts"
} |
angular/adev/src/content/examples/i18n/src/locale/messages.fr.xlf_0_4828 | <?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="introductionHeader" datatype="html">
<source>
Hello i18n!
</source>
<target>
Bon... | {
"end_byte": 4828,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/src/locale/messages.fr.xlf"
} |
angular/adev/src/content/examples/i18n/src/locale/messages.xlf_0_3849 | <?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="introductionHeader" datatype="html">
<source>
Hello i18n!
</source>
<context-group pur... | {
"end_byte": 3849,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/src/locale/messages.xlf"
} |
angular/adev/src/content/examples/i18n/src/app/app.component.html_0_1522 | <!--#docregion-->
<h1 i18n="User welcome|An introduction header for this sample@@introductionHeader">
Hello i18n!
</h1>
<!--#docregion i18n-ng-container-->
<ng-container i18n>I don't output any element</ng-container>
<!--#enddocregion i18n-ng-container-->
<br />
<!--#docregion i18n-title-translate-->
<img [src]="l... | {
"end_byte": 1522,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/src/app/app.component.html"
} |
angular/adev/src/content/examples/i18n/src/app/app.component.ts_0_853 | // #docregion
import {Component, computed, signal} from '@angular/core';
import {$localize} from '@angular/localize/init';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent {
minutes = 0;
gender = 'female';
fly = true;
logo = '${this.ba... | {
"end_byte": 853,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/i18n/src/app/app.component.ts"
} |
angular/adev/src/content/examples/accessibility/BUILD.bazel_0_181 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/app.component.html",
"src/app/app.component.ts",
"src/app/progress-bar.component.ts",
])
| {
"end_byte": 181,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/accessibility/BUILD.bazel"
} |
angular/adev/src/content/examples/accessibility/e2e/src/app.e2e-spec.ts_0_603 | import {browser, element, by} from 'protractor';
describe('Accessibility example e2e tests', () => {
beforeEach(() => browser.get(''));
it('should display Accessibility Example', async () => {
expect(await element(by.css('h1')).getText()).toEqual('Accessibility Example');
});
it('should take a number and... | {
"end_byte": 603,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/accessibility/e2e/src/app.e2e-spec.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.