From 84a727c691711e1e0fa39a54694721bafe21ba49 Mon Sep 17 00:00:00 2001 From: Ray Ma Date: Fri, 13 Dec 2019 17:51:27 -0500 Subject: [PATCH] Fix autofold imports issue#1208 The original reported issue is that HTML is auto-folded. But as of this PR, the observed behavior is that nothing is auto-folded. Changes: - configure Monaco setting to `folding: true` - fixes all use cases of - add `autoFold` directive to uses --- .../component-tree/component-tree.component.html | 5 +++++ .../create-first-app.component.html | 5 +++++ .../create-first-app/mode/mode.component.html | 3 +++ .../custom-events/custom-events.component.html | 2 ++ .../dependency-injection.component.html | 9 +++++++++ .../codelabs/angular/pipes/pipes.component.html | 16 ++++++++++++++-- .../structural-directives.component.html | 5 +++++ .../typescript/typescript.component.html | 3 +++ .../src/lib/shared/monaco-config.service.ts | 2 +- 9 files changed, 47 insertions(+), 3 deletions(-) diff --git a/apps/codelab/src/app/codelabs/angular/component-tree/component-tree.component.html b/apps/codelab/src/app/codelabs/angular/component-tree/component-tree.component.html index 4ea1b88f9..4a6eb4f31 100644 --- a/apps/codelab/src/app/codelabs/angular/component-tree/component-tree.component.html +++ b/apps/codelab/src/app/codelabs/angular/component-tree/component-tree.component.html @@ -92,6 +92,7 @@

class, function, property or variable

Loading order: index -> main -> app.module -> app.component Loading order: index -> main -> app.module -> app.component Loading order: index -> main -> app.module -> app.component Loading order: index -> main -> app.module -> app.component With Angular we build mobile apps using NativeScript or Ionic.
With Angular you can build VR apps with A-FRAME or WEBGL.
diff --git a/apps/codelab/src/app/codelabs/angular/custom-events/custom-events.component.html b/apps/codelab/src/app/codelabs/angular/custom-events/custom-events.component.html index a3e3f1994..cd4776c38 100644 --- a/apps/codelab/src/app/codelabs/angular/custom-events/custom-events.component.html +++ b/apps/codelab/src/app/codelabs/angular/custom-events/custom-events.component.html @@ -28,6 +28,7 @@

Custom Events / Passing data from child to parent

@@ -198,6 +203,7 @@

@@ -229,6 +235,7 @@

@@ -246,6 +253,7 @@

diff --git a/apps/codelab/src/app/codelabs/angular/pipes/pipes.component.html b/apps/codelab/src/app/codelabs/angular/pipes/pipes.component.html index 233c6bc27..cef09fe56 100644 --- a/apps/codelab/src/app/codelabs/angular/pipes/pipes.component.html +++ b/apps/codelab/src/app/codelabs/angular/pipes/pipes.component.html @@ -83,7 +83,11 @@

Pipes with arguments:

- +
To add parameters to a pipe, append a colon ( : ) followed by the @@ -94,7 +98,11 @@

Pipes with arguments:

Using custom pipes to filter data

- +
@@ -102,6 +110,7 @@

Using custom pipes to filter data

Creating a pipe

A pipe is a class decorated with pipe metadata.

Creating a pipe

The pipe class implements the PipeTransform interface.

Creating a pipe

Creating a pipe

Structural directives ngIf
Desugars into

Structural directives ngFor
Desugars into

Angular MicroSyntax
Below are more types we can use