_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/adev/src/content/api-examples/common/ngIf/ts/module.ts_0_3503 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Component, NgModule, OnInit, TemplateRef, ViewChild} from '@angular/core';
import {BrowserModule} from '@ang... | {
"end_byte": 3503,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/common/ngIf/ts/module.ts"
} |
angular/adev/src/content/api-examples/common/ngIf/ts/e2e_test/ngIf_spec.ts_0_2783 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {$, browser, by, element, ExpectedConditions} from 'protractor';
import {verifyNoBrowserErrors} from '../../... | {
"end_byte": 2783,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/common/ngIf/ts/e2e_test/ngIf_spec.ts"
} |
angular/adev/src/content/api-examples/service-worker/registration-options/ngsw-worker.js_0_516 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Mock `ngsw-worker.js` used for testing the examples.
// Immediately takes over and unregisters itself.
self.addEv... | {
"end_byte": 516,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/registration-options/ngsw-worker.js"
} |
angular/adev/src/content/api-examples/service-worker/registration-options/main.ts_0_412 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import 'zone.js/lib/browser/rollup-main';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';... | {
"end_byte": 412,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/registration-options/main.ts"
} |
angular/adev/src/content/api-examples/service-worker/registration-options/module.ts_0_1284 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// tslint:disable: no-duplicate-imports
import {Component} from '@angular/core';
// #docregion registration-options
i... | {
"end_byte": 1284,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/registration-options/module.ts"
} |
angular/adev/src/content/api-examples/service-worker/registration-options/start-server.js_0_552 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
const protractorUtils = require('@bazel/protractor/protractor-utils');
const protractor = require('protractor');
mo... | {
"end_byte": 552,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/registration-options/start-server.js"
} |
angular/adev/src/content/api-examples/service-worker/registration-options/e2e_test/registration-options_spec.ts_0_839 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../../../packages/... | {
"end_byte": 839,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/registration-options/e2e_test/registration-options_spec.ts"
} |
angular/adev/src/content/api-examples/service-worker/push/ngsw-worker.js_0_516 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Mock `ngsw-worker.js` used for testing the examples.
// Immediately takes over and unregisters itself.
self.addEv... | {
"end_byte": 516,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/push/ngsw-worker.js"
} |
angular/adev/src/content/api-examples/service-worker/push/main.ts_0_412 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import 'zone.js/lib/browser/rollup-main';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';... | {
"end_byte": 412,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/push/main.ts"
} |
angular/adev/src/content/api-examples/service-worker/push/module.ts_0_1752 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// tslint:disable: no-duplicate-imports
import {Component, NgModule} from '@angular/core';
import {BrowserModule} fro... | {
"end_byte": 1752,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/push/module.ts"
} |
angular/adev/src/content/api-examples/service-worker/push/start-server.js_0_552 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
const protractorUtils = require('@bazel/protractor/protractor-utils');
const protractor = require('protractor');
mo... | {
"end_byte": 552,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/push/start-server.js"
} |
angular/adev/src/content/api-examples/service-worker/push/e2e_test/push_spec.ts_0_630 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../../../packages/... | {
"end_byte": 630,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/service-worker/push/e2e_test/push_spec.ts"
} |
angular/adev/src/content/api-examples/platform-browser/BUILD.bazel_0_435 | load("//tools:defaults.bzl", "ng_module")
package(default_visibility = ["//visibility:public"])
ng_module(
name = "platform_browser_examples",
srcs = glob(["**/*.ts"]),
deps = [
"//packages/compiler",
"//packages/core",
"//packages/platform-browser",
"//packages/platform-br... | {
"end_byte": 435,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/platform-browser/BUILD.bazel"
} |
angular/adev/src/content/api-examples/platform-browser/dom/debug/ts/by/by.ts_0_604 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {DebugElement} from '@angular/core';
import {By} from '@angular/platform-browser';
let debugElement: DebugEl... | {
"end_byte": 604,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/platform-browser/dom/debug/ts/by/by.ts"
} |
angular/adev/src/content/api-examples/platform-browser/dom/debug/ts/debug_element_view_listener/providers.ts_0_635 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Component, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {... | {
"end_byte": 635,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/platform-browser/dom/debug/ts/debug_element_view_listener/providers.ts"
} |
angular/adev/src/content/api-examples/router/route_functional_guards.ts_0_3607 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Component, inject, Injectable} from '@angular/core';
import {bootstrapApplication} from '@angular/platform-b... | {
"end_byte": 3607,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/route_functional_guards.ts"
} |
angular/adev/src/content/api-examples/router/activated-route/main.ts_0_412 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import 'zone.js/lib/browser/rollup-main';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';... | {
"end_byte": 412,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/activated-route/main.ts"
} |
angular/adev/src/content/api-examples/router/activated-route/module.ts_0_1289 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// #docregion activated-route
import {Component, NgModule} from '@angular/core';
// #enddocregion activated-route
imp... | {
"end_byte": 1289,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/activated-route/module.ts"
} |
angular/adev/src/content/api-examples/router/activated-route/BUILD.bazel_0_826 | load("//tools:defaults.bzl", "esbuild", "http_server", "ng_module")
package(default_visibility = ["//visibility:public"])
ng_module(
name = "router_activated_route_examples",
srcs = glob(
["**/*.ts"],
),
deps = [
"//packages/core",
"//packages/platform-browser",
"//pack... | {
"end_byte": 826,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/activated-route/BUILD.bazel"
} |
angular/adev/src/content/api-examples/router/utils/functional_guards.ts_0_802 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Injectable} from '@angular/core';
import {mapToCanActivate, mapToResolve, Route} from '@angular/router';
//... | {
"end_byte": 802,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/utils/functional_guards.ts"
} |
angular/adev/src/content/api-examples/router/testing/BUILD.bazel_0_717 | load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "test_lib",
testonly = True,
srcs = glob(["**/*.spec.ts"]),
deps = [
"//packages/common",
"//packages/core",
"//packa... | {
"end_byte": 717,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/testing/BUILD.bazel"
} |
angular/adev/src/content/api-examples/router/testing/test/router_testing_harness_examples.spec.ts_0_3034 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {AsyncPipe} from '@angular/common';
import {Component, inject} from '@angular/core';
import {TestBed} from '@... | {
"end_byte": 3034,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/api-examples/router/testing/test/router_testing_harness_examples.spec.ts"
} |
angular/adev/src/content/cli/index.md_0_5799 | # CLI Overview and Command Reference
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command shell.
## Installing Angular CLI
Major versions of Angular CLI follow the supported major version of Angular, but minor versio... | {
"end_byte": 5799,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/cli/index.md"
} |
angular/adev/src/content/cli/BUILD.bazel_0_288 | package(default_visibility = ["//visibility:public"])
filegroup(
name = "cli",
srcs = glob(
["**"],
exclude = [
"BUILD.bazel",
],
) + [
"//adev/src/content/cli/help",
"//adev/src/content/cli/help:build-info.json",
],
)
| {
"end_byte": 288,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/cli/BUILD.bazel"
} |
angular/adev/src/content/cli/help/BUILD.bazel_0_499 | load("//adev/shared-docs/pipeline/api-gen/rendering:render_api_to_html.bzl", "render_api_to_html")
package(default_visibility = ["//visibility:public"])
exports_files(["build-info.json"])
filegroup(
name = "help",
srcs = glob(
["*"],
exclude = [
# Exlucde build-info.json as it is ... | {
"end_byte": 499,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/cli/help/BUILD.bazel"
} |
angular/adev/src/content/examples/cli-builder/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/cli-builder/BUILD.bazel"
} |
angular/adev/src/content/examples/cli-builder/src/my-builder.spec.ts_0_1822 | // #docregion
import {Architect} from '@angular-devkit/architect';
import {TestingArchitectHost} from '@angular-devkit/architect/testing';
import {schema} from '@angular-devkit/core';
import {promises as fs} from 'fs';
import {join} from 'path';
describe('Copy File Builder', () => {
let architect: Architect;
let a... | {
"end_byte": 1822,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/cli-builder/src/my-builder.spec.ts"
} |
angular/adev/src/content/examples/cli-builder/src/my-builder.ts_0_1311 | // #docplaster
// #docregion builder, builder-skeleton
import {BuilderContext, BuilderOutput, createBuilder} from '@angular-devkit/architect';
import {JsonObject} from '@angular-devkit/core';
// #enddocregion builder-skeleton
import {promises as fs} from 'fs';
// #docregion builder-skeleton
interface Options extends J... | {
"end_byte": 1311,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/cli-builder/src/my-builder.ts"
} |
angular/adev/src/content/examples/injection-token/BUILD.bazel_0_54 | package(default_visibility = ["//visibility:public"])
| {
"end_byte": 54,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/injection-token/BUILD.bazel"
} |
angular/adev/src/content/examples/injection-token/e2e/src/app.e2e-spec.ts_0_262 | /*
* This example project is special in that it is not a cli app.
*
* This is an empty placeholder file to ensure that example tests correctly runs
* tests for this project.
*
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
*/
| {
"end_byte": 262,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/injection-token/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/injection-token/src/main.ts_0_744 | // TODO: Add unit tests for this file.
/* eslint-disable @angular-eslint/no-output-native */
// #docregion
import {Injector, InjectionToken} from '@angular/core';
interface MyInterface {
someProperty: string;
}
// #docregion InjectionToken
const TOKEN = new InjectionToken<MyInterface>('SomeToken');
// Setting up ... | {
"end_byte": 744,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/injection-token/src/main.ts"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/BUILD.bazel_0_183 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/app.component.html",
"src/app/app.routes.ts",
"src/app/profile/profile.component.html",
])
| {
"end_byte": 183,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/BUILD.bazel"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/e2e/src/app.e2e-spec.ts_0_304 | import {browser, element, by} from 'protractor';
describe('Routing with Custom Matching', () => {
beforeAll(() => browser.get(''));
it('should display Routing with Custom Matching ', async () => {
expect(await element(by.css('h2')).getText()).toEqual('Routing with Custom Matching');
});
});
| {
"end_byte": 304,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/index.html_0_161 | <!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<title>Angular App</title>
</head>
<body>
<app-root>loading</app-root>
</body>
</html>
| {
"end_byte": 161,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/index.html"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/main.ts_0_221 | // #docregion
import {bootstrapApplication} from '@angular/platform-browser';
import {AppComponent} from './app/app.component';
import {appConfig} from './app/app.config';
bootstrapApplication(AppComponent, appConfig);
| {
"end_byte": 221,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/main.ts"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/app.component.html_0_124 | <h2>Routing with Custom Matching</h2>
Navigate to <a routerLink="/@Angular">my profile</a>
<router-outlet></router-outlet> | {
"end_byte": 124,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/app.component.html"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/app.routes.ts_0_465 | import {Routes, UrlSegment} from '@angular/router';
import {ProfileComponent} from './profile/profile.component';
export const routes: Routes = [
// #docregion matcher
{
matcher: (url) => {
if (url.length === 1 && url[0].path.match(/^@[\w]+$/gm)) {
return {consumed: url, posParams: {username: ne... | {
"end_byte": 465,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/app.routes.ts"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/app.component.ts_0_352 | import {Component, VERSION} from '@angular/core';
import {RouterLink, RouterOutlet} from '@angular/router';
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, RouterLink],
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
name ... | {
"end_byte": 352,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/app.component.ts"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/app.config.ts_0_401 | import {ApplicationConfig} from '@angular/core';
import {provideProtractorTestingSupport} from '@angular/platform-browser';
import {provideRouter, withComponentInputBinding} from '@angular/router';
import {routes} from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(rout... | {
"end_byte": 401,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/app.config.ts"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/app.component.css_0_26 | p {
font-family: Lato;
} | {
"end_byte": 26,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/app.component.css"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.html_0_34 | <p>
Hello {{ username }}!
</p> | {
"end_byte": 34,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.html"
} |
angular/adev/src/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.ts_0_261 | import {Component, Input} from '@angular/core';
@Component({
selector: 'app-profile',
standalone: true,
templateUrl: './profile.component.html',
styleUrls: ['./profile.component.css'],
})
export class ProfileComponent {
@Input() username!: string;
}
| {
"end_byte": 261,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.ts"
} |
angular/adev/src/content/examples/forms/BUILD.bazel_0_388 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/actor.ts",
"src/app/actor-form/actor-form.component.html",
"src/app/actor-form/actor-form.component.ts",
"src/app/app.component.html",
"src/app/app.component.ts",
"src/app/app.module.ts",
"src/assets/forms.css",
... | {
"end_byte": 388,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/BUILD.bazel"
} |
angular/adev/src/content/examples/forms/e2e/src/app.e2e-spec.ts_0_2105 | import {browser, element, by} from 'protractor';
describe('Forms Tests', () => {
beforeEach(() => browser.get(''));
it('should display correct title', async () => {
expect(await element.all(by.css('h1')).get(0).getText()).toEqual('Actor Form');
});
it('should not display message before submit', async () ... | {
"end_byte": 2105,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/forms/src/index.html_0_501 | <!DOCTYPE html>
<!-- #docregion -->
<html lang="en">
<head>
<title>Hero Form</title>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css">
... | {
"end_byte": 501,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/index.html"
} |
angular/adev/src/content/examples/forms/src/main.ts_0_228 | // #docregion
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './app/app.module';
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
| {
"end_byte": 228,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/main.ts"
} |
angular/adev/src/content/examples/forms/src/styles.1.css_0_77 | @import url('https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css');
| {
"end_byte": 77,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/styles.1.css"
} |
angular/adev/src/content/examples/forms/src/app/app.component.html_0_34 | <app-actor-form></app-actor-form>
| {
"end_byte": 34,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/app/app.component.html"
} |
angular/adev/src/content/examples/forms/src/app/actor.ts_0_161 | // #docregion
export class Actor {
constructor(
public id: number,
public name: string,
public skill: string,
public studio?: string,
) {}
}
| {
"end_byte": 161,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/app/actor.ts"
} |
angular/adev/src/content/examples/forms/src/app/app.module.ts_0_513 | // #docregion
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
import {ActorFormComponent} from './actor-form/actor-form.component';
@... | {
"end_byte": 513,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/app/app.module.ts"
} |
angular/adev/src/content/examples/forms/src/app/app.component.ts_0_185 | // #docregion
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
standalone: false,
})
export class AppComponent {}
| {
"end_byte": 185,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/app/app.component.ts"
} |
angular/adev/src/content/examples/forms/src/app/actor-form/actor-form.component.ts_0_1273 | // #docplaster
// #docregion , v1, final
import {Component} from '@angular/core';
import {Actor} from '../actor';
@Component({
selector: 'app-actor-form',
templateUrl: './actor-form.component.html',
standalone: false,
})
export class ActorFormComponent {
skills = ['Method Acting', 'Singing', 'Dancing', 'Sword... | {
"end_byte": 1273,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/app/actor-form/actor-form.component.ts"
} |
angular/adev/src/content/examples/forms/src/app/actor-form/actor-form.component.html_0_6133 | <!-- #docplaster -->
<!-- #docregion final -->
<div class="container">
<!-- #docregion edit-div -->
<div [hidden]="submitted">
<h1>Actor Form</h1>
<!-- #docregion ngSubmit -->
<form (ngSubmit)="onSubmit()" #actorForm="ngForm">
<!-- #enddocregion ngSubmit, edit-div -->
<div class="form-group"... | {
"end_byte": 6133,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/app/actor-form/actor-form.component.html"
} |
angular/adev/src/content/examples/forms/src/assets/forms.css_0_200 | /* #docregion */
.ng-valid[required], .ng-valid.required {
border-left: 5px solid #42A948; /* green */
}
.ng-invalid:not(form) {
border-left: 5px solid #a94442; /* red */
}
/* #enddocregion */
| {
"end_byte": 200,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/forms/src/assets/forms.css"
} |
angular/adev/src/content/examples/schematics-for-libraries/BUILD.bazel_0_532 | package(default_visibility = ["//visibility:public"])
exports_files([
"projects/my-lib/package.json",
"projects/my-lib/schematics/collection.1.json",
"projects/my-lib/schematics/collection.json",
"projects/my-lib/schematics/my-service/index.1.ts",
"projects/my-lib/schematics/my-service/index.ts",
... | {
"end_byte": 532,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/BUILD.bazel"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts_0_249 | import {Rule, Tree} from '@angular-devkit/schematics';
import {Schema as MyServiceSchema} from './schema';
// #docregion factory
export function myService(options: MyServiceSchema): Rule {
return (tree: Tree) => tree;
}
// #enddocregion factory
| {
"end_byte": 249,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts_0_180 | export interface Schema {
// The name of the service.
name: string;
// The path to create the service.
path?: string;
// The name of the project.
project?: string;
}
| {
"end_byte": 180,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts_0_2248 | // #docplaster
// #docregion schematics-imports, schema-imports, workspace
import {
Rule,
Tree,
SchematicsException,
apply,
url,
applyTemplates,
move,
chain,
mergeWith,
} from '@angular-devkit/schematics';
import {strings, normalize, virtualFs, workspaces} from '@angular-devkit/core';
// #enddocregio... | {
"end_byte": 2248,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/files/__name@dasherize__.service.ts.template_0_246 | // #docregion template
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class <%= classify(name) %>Service {
constructor(private http: HttpClient) { }
} | {
"end_byte": 246,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/files/__name@dasherize__.service.ts.template"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.ts_0_73 | export interface Schema {
// Name of the project.
project: string;
}
| {
"end_byte": 73,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts_0_393 | import {Rule} from '@angular-devkit/schematics';
import {addRootImport} from '@schematics/angular/utility';
import {Schema} from './schema';
export function ngAdd(options: Schema): Rule {
// Add an import `MyLibModule` from `my-lib` to the root of the user's project.
return addRootImport(
options.project,
... | {
"end_byte": 393,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/public_api.ts_0_155 | /*
* Public API Surface of my-lib
*/
export * from './lib/my-lib.service';
export * from './lib/my-lib.component';
export * from './lib/my-lib.module';
| {
"end_byte": 155,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/public_api.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.ts_0_111 | import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class MyLibService {}
| {
"end_byte": 111,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.spec.ts_0_328 | import {TestBed} from '@angular/core/testing';
import {MyLibService} from './my-lib.service';
describe('MyLibService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: MyLibService = TestBed.inject(MyLibService);
expect(service).toBeTruthy();
... | {
"end_byte": 328,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.spec.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.spec.ts_0_613 | import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {MyLibComponent} from './my-lib.component';
describe('MyLibComponent', () => {
let component: MyLibComponent;
let fixture: ComponentFixture<MyLibComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({... | {
"end_byte": 613,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.spec.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.module.ts_0_213 | import {NgModule} from '@angular/core';
import {MyLibComponent} from './my-lib.component';
@NgModule({
declarations: [MyLibComponent],
imports: [],
exports: [MyLibComponent],
})
export class MyLibModule {}
| {
"end_byte": 213,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.module.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.ts_0_206 | import {Component} from '@angular/core';
@Component({
selector: 'lib-my-lib',
template: `
<p>
my-lib works!
</p>
`,
styles: [],
standalone: false,
})
export class MyLibComponent {}
| {
"end_byte": 206,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/src/index.html_0_308 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SchematicsForLibraries</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": 308,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/src/index.html"
} |
angular/adev/src/content/examples/schematics-for-libraries/src/main.ts_0_214 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './app/app.module';
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
| {
"end_byte": 214,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/src/main.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/src/app/app.module.ts_0_292 | import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
| {
"end_byte": 292,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/src/app/app.module.ts"
} |
angular/adev/src/content/examples/schematics-for-libraries/src/app/app.component.ts_0_236 | import {Component} from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h2>Library Schematics</h2>
`,
styles: [],
standalone: false,
})
export class AppComponent {
title = 'schematics-for-libraries';
}
| {
"end_byte": 236,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/schematics-for-libraries/src/app/app.component.ts"
} |
angular/adev/src/content/examples/bootstrapping/BUILD.bazel_0_54 | package(default_visibility = ["//visibility:public"])
| {
"end_byte": 54,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/BUILD.bazel"
} |
angular/adev/src/content/examples/bootstrapping/e2e/src/app.e2e-spec.ts_0_313 | import {AppPage} from './app.po';
describe('feature-modules App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display message saying app works', async () => {
await page.navigateTo();
expect(await page.getTitleText()).toEqual('app works!');
});
});
| {
"end_byte": 313,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/bootstrapping/src/index.html_0_308 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>NgmoduleDemo</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>
</html>
| {
"end_byte": 308,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/src/index.html"
} |
angular/adev/src/content/examples/bootstrapping/src/main.ts_0_214 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './app/app.module';
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
| {
"end_byte": 214,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/src/main.ts"
} |
angular/adev/src/content/examples/bootstrapping/src/app/app.component.html_0_25 | <h1>
{{ title }}
</h1>
| {
"end_byte": 25,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/src/app/app.component.html"
} |
angular/adev/src/content/examples/bootstrapping/src/app/app.module.ts_0_729 | // #docplaster
// imports
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';
import {AppComponent} from './app.component';
// #docregion directive-import
import {ItemDirectiv... | {
"end_byte": 729,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/src/app/app.module.ts"
} |
angular/adev/src/content/examples/bootstrapping/src/app/app.component.ts_0_234 | import {Component} from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
standalone: false,
})
export class AppComponent {
title = 'app works!';
}
| {
"end_byte": 234,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/src/app/app.component.ts"
} |
angular/adev/src/content/examples/bootstrapping/src/app/item.directive.ts_0_241 | // #docplaster
// #docregion directive
import {Directive} from '@angular/core';
@Directive({
selector: '[appItem]',
standalone: false,
})
export class ItemDirective {
// code goes here
constructor() {}
}
// #enddocregion directive
| {
"end_byte": 241,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/bootstrapping/src/app/item.directive.ts"
} |
angular/adev/src/content/examples/security/BUILD.bazel_0_260 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/bypass-security.component.html",
"src/app/bypass-security.component.ts",
"src/app/inner-html-binding.component.html",
"src/app/inner-html-binding.component.ts",
])
| {
"end_byte": 260,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/BUILD.bazel"
} |
angular/adev/src/content/examples/security/e2e/src/app.e2e-spec.ts_0_1420 | import {browser, element, By} from 'protractor';
describe('Security E2E Tests', () => {
beforeAll(() => browser.get(''));
it('sanitizes innerHTML', async () => {
const interpolated = element(By.className('e2e-inner-html-interpolated'));
expect(await interpolated.getText()).toContain(
'Template <scri... | {
"end_byte": 1420,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/security/src/index.html_0_290 | <!-- #docregion -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Angular Content Security</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": 290,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/src/index.html"
} |
angular/adev/src/content/examples/security/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/security/src/main.ts"
} |
angular/adev/src/content/examples/security/src/app/app.component.ts_0_496 | // #docregion
import {Component} from '@angular/core';
import {BypassSecurityComponent} from './bypass-security.component';
import {InnerHtmlBindingComponent} from './inner-html-binding.component';
@Component({
standalone: true,
selector: 'app-root',
template: `
<h1>Security</h1>
<app-inner-html-binding>... | {
"end_byte": 496,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/src/app/app.component.ts"
} |
angular/adev/src/content/examples/security/src/app/inner-html-binding.component.html_0_230 | <!-- #docregion -->
<h3>Binding innerHTML</h3>
<p>Bound value:</p>
<p class="e2e-inner-html-interpolated">{{ htmlSnippet }}</p>
<p>Result of binding to innerHTML:</p>
<p class="e2e-inner-html-bound" [innerHTML]="htmlSnippet"></p>
| {
"end_byte": 230,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/src/app/inner-html-binding.component.html"
} |
angular/adev/src/content/examples/security/src/app/bypass-security.component.ts_0_1348 | // #docplaster
// #docregion
import {Component} from '@angular/core';
import {DomSanitizer, SafeResourceUrl, SafeUrl} from '@angular/platform-browser';
@Component({
standalone: true,
selector: 'app-bypass-security',
templateUrl: './bypass-security.component.html',
})
export class BypassSecurityComponent {
dang... | {
"end_byte": 1348,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/src/app/bypass-security.component.ts"
} |
angular/adev/src/content/examples/security/src/app/inner-html-binding.component.ts_0_384 | // #docregion
import {Component} from '@angular/core';
@Component({
standalone: true,
selector: 'app-inner-html-binding',
templateUrl: './inner-html-binding.component.html',
})
// #docregion class
export class InnerHtmlBindingComponent {
// For example, a user/attacker-controlled value from a URL.
htmlSnippe... | {
"end_byte": 384,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/src/app/inner-html-binding.component.ts"
} |
angular/adev/src/content/examples/security/src/app/bypass-security.component.html_0_664 | <!--#docregion -->
<h3>Bypass Security Component</h3>
<!--#docregion URL -->
<h4>An untrusted URL:</h4>
<p><a class="e2e-dangerous-url" [href]="dangerousUrl">Click me</a></p>
<h4>A trusted URL:</h4>
<p><a class="e2e-trusted-url" [href]="trustedUrl">Click me</a></p>
<!--#enddocregion URL -->
<!--#docregion iframe -->
... | {
"end_byte": 664,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/security/src/app/bypass-security.component.html"
} |
angular/adev/src/content/examples/form-validation/BUILD.bazel_0_480 | package(default_visibility = ["//visibility:public"])
exports_files([
"src/app/reactive/actor-form-reactive.component.1.ts",
"src/app/reactive/actor-form-reactive.component.2.ts",
"src/app/reactive/actor-form-reactive.component.html",
"src/app/shared/forbidden-name.directive.ts",
"src/app/shared/ro... | {
"end_byte": 480,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/BUILD.bazel"
} |
angular/adev/src/content/examples/form-validation/e2e/src/app.e2e-spec.ts_0_7542 | import {browser, element, by, protractor, ElementFinder, ElementArrayFinder} from 'protractor';
// THESE TESTS ARE INCOMPLETE
describe('Form Validation Tests', () => {
beforeAll(() => browser.get(''));
describe('Template-driven form', () => {
beforeAll(() => {
getPage('app-actor-form-template');
});... | {
"end_byte": 7542,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/e2e/src/app.e2e-spec.ts"
} |
angular/adev/src/content/examples/form-validation/src/index.html_0_324 | <!DOCTYPE html>
<html lang="en">
<head>
<title>Hero Form with Validation</title>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/forms.css">
</head>
<body>
<app-root></app-root>
</body>
</htm... | {
"end_byte": 324,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/index.html"
} |
angular/adev/src/content/examples/form-validation/src/main.ts_0_228 | // #docregion
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './app/app.module';
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
| {
"end_byte": 228,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/main.ts"
} |
angular/adev/src/content/examples/form-validation/src/app/app.module.ts_0_973 | // #docregion
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
import {ActorFormTemplateComponent} from './template/actor-form-template.component';
import {Acto... | {
"end_byte": 973,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/app.module.ts"
} |
angular/adev/src/content/examples/form-validation/src/app/app.component.ts_0_292 | // #docregion
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
template: `<h1>Form validation example</h1>
<app-actor-form-template/>
<hr>
<app-actor-form-reactive/>`,
standalone: false,
})
export class AppComponent {}
| {
"end_byte": 292,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/app.component.ts"
} |
angular/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.2.ts_0_1625 | // #docplaster
// #docregion
import {Component, OnInit} from '@angular/core';
import {FormControl, FormGroup, Validators} from '@angular/forms';
import {forbiddenNameValidator} from '../shared/forbidden-name.directive';
import {UniqueRoleValidator} from '../shared/role.directive';
@Component({
selector: 'app-actor-f... | {
"end_byte": 1625,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.2.ts"
} |
angular/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.ts_0_1600 | // #docregion
import {Component, OnInit} from '@angular/core';
import {FormControl, FormGroup, Validators} from '@angular/forms';
import {forbiddenNameValidator} from '../shared/forbidden-name.directive';
import {unambiguousRoleValidator} from '../shared/identity-revealed.directive';
import {UniqueRoleValidator} from '... | {
"end_byte": 1600,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.ts"
} |
angular/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.html_1_2909 | <!-- #docregion -->
<div class="container">
<h2>Reactive Form</h2>
<form [formGroup]="actorForm" #formDir="ngForm">
<div [hidden]="formDir.submitted">
<div class="cross-validation" [class.cross-validation-error]="actorForm.hasError('unambiguousRole') && (actorForm.touched || actorForm.dirty)">
... | {
"end_byte": 2909,
"start_byte": 1,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.html"
} |
angular/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.1.ts_0_1297 | // #docplaster
// #docregion
import {Component, OnInit} from '@angular/core';
import {FormControl, FormGroup, Validators} from '@angular/forms';
import {forbiddenNameValidator} from '../shared/forbidden-name.directive';
@Component({
selector: 'app-actor-form-reactive',
templateUrl: './actor-form-reactive.component... | {
"end_byte": 1297,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.1.ts"
} |
angular/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.css_0_64 | .cross-validation-error input {
border-left: 5px solid red;
}
| {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/reactive/actor-form-reactive.component.css"
} |
angular/adev/src/content/examples/form-validation/src/app/template/actor-form-template.component.html_1_3327 | <!-- #docregion -->
<div>
<h2>Template-Driven Form</h2>
<!-- #docregion cross-validation-register-validator -->
<form #actorForm="ngForm" appUnambiguousRole>
<!-- #enddocregion cross-validation-register-validator -->
<div [hidden]="actorForm.submitted">
<div class="cross-validation" [class.cross-vali... | {
"end_byte": 3327,
"start_byte": 1,
"url": "https://github.com/angular/angular/blob/main/adev/src/content/examples/form-validation/src/app/template/actor-form-template.component.html"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.