Skip to content

Commit d352484

Browse files
bencodezenthePunderWoman
authored andcommitted
docs: add signal forms tutorial
1 parent ca18d8e commit d352484

File tree

55 files changed

+10872
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+10872
-0
lines changed

adev/src/app/routing/sub-navigation-data.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import FIRST_APP_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/first-app
1414
import LEARN_ANGULAR_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/learn-angular/routes.json';
1515
import DEFERRABLE_VIEWS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/deferrable-views/routes.json';
1616
import SIGNALS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/signals/routes.json';
17+
import SIGNAL_FORMS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/signal-forms/routes.json';
1718
import ERRORS_NAV_DATA from '../../../src/assets/content/reference/errors/routes.json';
1819
import EXT_DIAGNOSTICS_NAV_DATA from '../../../src/assets/content/reference/extended-diagnostics/routes.json';
1920

@@ -1201,6 +1202,7 @@ export const TUTORIALS_SUB_NAVIGATION_DATA: NavigationItem[] = [
12011202
LEARN_ANGULAR_TUTORIAL_NAV_DATA,
12021203
DEFERRABLE_VIEWS_TUTORIAL_NAV_DATA,
12031204
SIGNALS_TUTORIAL_NAV_DATA,
1205+
SIGNAL_FORMS_TUTORIAL_NAV_DATA,
12041206
{
12051207
path: DEFAULT_PAGES.TUTORIALS,
12061208
contentPath: 'tutorials/home',

adev/src/assets/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ copy_to_directory(
5151
"//adev/src/content/tutorials/deferrable-views:deferrable-views-guides",
5252
"//adev/src/content/tutorials/first-app:first-app-guides",
5353
"//adev/src/content/tutorials/learn-angular:learn-angular-guides",
54+
"//adev/src/content/tutorials/signal-forms",
55+
"//adev/src/content/tutorials/signal-forms:signal-forms-guides",
5456
"//adev/src/content/tutorials/signals",
5557
"//adev/src/content/tutorials/signals:signals-guides",
5658
"//packages/animations:animations_docs",
@@ -109,6 +111,7 @@ copy_to_directory(
109111
"//adev/src/content/tutorials/homepage",
110112
"//adev/src/content/tutorials/learn-angular",
111113
"//adev/src/content/tutorials/playground",
114+
"//adev/src/content/tutorials/signal-forms",
112115
"//adev/src/content/tutorials/signals",
113116
],
114117
replace_prefixes = {

adev/src/content/tutorials/home.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ Welcome to the Angular tutorials! These tutorials will guide you through the cor
1818
<docs-card title="Deferrable views" link="Start coding" href="tutorials/deferrable-views" imgSrc="adev/src/assets/images/ang_illustrations-04.svg">
1919
via the Playground
2020
</docs-card>
21+
<docs-card title="Learn signals forms" link="Start coding" href="tutorials/signal-forms" imgSrc="adev/src/assets/images/learn-angular-local.svg">
22+
via the Playground
23+
</docs-card>
2124
</docs-card-container>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
load("//adev/shared-docs:index.bzl", "generate_guides", "generate_tutorial")
2+
3+
package(default_visibility = ["//adev:__subpackages__"])
4+
5+
generate_guides(
6+
name = "signal-forms-guides",
7+
srcs = glob(
8+
[
9+
"**/*.md",
10+
],
11+
exclude = [
12+
"**/node_modules/**/*.md",
13+
],
14+
),
15+
)
16+
17+
filegroup(
18+
name = "files",
19+
srcs = glob(
20+
["**/*"],
21+
exclude = ["**/*.md"],
22+
),
23+
)
24+
25+
generate_tutorial(
26+
name = "signal-forms",
27+
tutorial_srcs = ":files",
28+
)
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"first-app": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"inlineTemplate": true,
11+
"inlineStyle": true,
12+
"style": "scss",
13+
"skipTests": true
14+
},
15+
"@schematics/angular:class": {
16+
"skipTests": true
17+
},
18+
"@schematics/angular:directive": {
19+
"skipTests": true
20+
},
21+
"@schematics/angular:guard": {
22+
"skipTests": true
23+
},
24+
"@schematics/angular:interceptor": {
25+
"skipTests": true
26+
},
27+
"@schematics/angular:pipe": {
28+
"skipTests": true
29+
},
30+
"@schematics/angular:resolver": {
31+
"skipTests": true
32+
},
33+
"@schematics/angular:service": {
34+
"skipTests": true
35+
}
36+
},
37+
"root": "",
38+
"sourceRoot": "src",
39+
"prefix": "app",
40+
"architect": {
41+
"build": {
42+
"builder": "@angular/build:application",
43+
"options": {
44+
"outputPath": "dist/first-app",
45+
"index": "src/index.html",
46+
"browser": "src/main.ts",
47+
"polyfills": ["zone.js"],
48+
"tsConfig": "tsconfig.app.json",
49+
"inlineStyleLanguage": "scss",
50+
"assets": [
51+
{
52+
"glob": "**/*",
53+
"input": "src/public"
54+
}
55+
],
56+
"styles": ["src/styles.css"],
57+
"scripts": []
58+
},
59+
"configurations": {
60+
"production": {
61+
"budgets": [
62+
{
63+
"type": "initial",
64+
"maximumWarning": "500kB",
65+
"maximumError": "1MB"
66+
},
67+
{
68+
"type": "anyComponentStyle",
69+
"maximumWarning": "2kB",
70+
"maximumError": "4kB"
71+
}
72+
],
73+
"outputHashing": "all"
74+
},
75+
"development": {
76+
"optimization": false,
77+
"extractLicenses": false,
78+
"sourceMap": true
79+
}
80+
},
81+
"defaultConfiguration": "production"
82+
},
83+
"serve": {
84+
"builder": "@angular/build:dev-server",
85+
"configurations": {
86+
"production": {
87+
"buildTarget": "first-app:build:production"
88+
},
89+
"development": {
90+
"buildTarget": "first-app:build:development"
91+
}
92+
},
93+
"defaultConfiguration": "development"
94+
},
95+
"extract-i18n": {
96+
"builder": "@angular/build:extract-i18n"
97+
}
98+
}
99+
}
100+
}
101+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# To learn more about how to use Nix to configure your environment
2+
# see: https://developers.google.com/idx/guides/customize-idx-env
3+
{ pkgs, ... }: {
4+
# Which nixpkgs channel to use.
5+
channel = "stable-23.11"; # or "unstable"
6+
# Use https://search.nixos.org/packages to find packages
7+
packages = [
8+
pkgs.nodejs_18
9+
];
10+
# Sets environment variables in the workspace
11+
env = {};
12+
idx = {
13+
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
14+
extensions = [
15+
"angular.ng-template"
16+
];
17+
workspace = {
18+
# Runs when a workspace is first created with this \`dev.nix\` file
19+
onCreate = {
20+
npm-install = "npm install --no-audit --prefer-offline";
21+
};
22+
# To run something each time the environment is rebuilt, use the \`onStart\` hook
23+
};
24+
# Enable previews and customize configuration
25+
previews = {
26+
enable = true;
27+
previews = {
28+
web = {
29+
command = ["npm" "run" "start" "--" "--port" "$PORT" "--host" "0.0.0.0"];
30+
manager = "web";
31+
};
32+
};
33+
};
34+
};
35+
}

0 commit comments

Comments
 (0)