Skip to content

Fix autofold imports issue#1208 #1224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ <h2 i18n>
<div column-5>
<code-demo-file-path path="box.component.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.circleAndBox.other.boxNoParams"
[codeDemoHighlight]="code.parentComponentSkeleton.match"
Expand All @@ -100,6 +101,7 @@ <h2 i18n>
<div column-5>
<code-demo-file-path path="circle.component.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.circleAndBox.files[0].code"
[codeDemoHighlight]="code.parentComponentSkeleton.match"
Expand Down Expand Up @@ -205,6 +207,7 @@ <h2 i18n>
<div column-5>
<code-demo-file-path path="box.component.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.circleAndBox.files[1].code"
[codeDemoHighlight]="code.parentComponentSkeleton.match"
Expand All @@ -213,6 +216,7 @@ <h2 i18n>
<div column-5>
<code-demo-file-path path="circle.component.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.circleAndBox.files[0].code"
[codeDemoHighlight]="code.parentComponentSkeleton.match"
Expand All @@ -223,6 +227,7 @@ <h2 i18n>
<div column-5>
<code-demo-file-path path="module.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.circleAndBox.files[2].code"
[codeDemoHighlight]="code.appModule.match"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ <h2 i18n>
class, function, property or variable
</h2>
<code-demo-editor
autoFolding
language="typescript"
[fontSize]="30"
[(ngModel)]="code.decorators.code"
Expand Down Expand Up @@ -445,6 +446,7 @@ <h2 i18n>Loading order: index -> main -> app.module -> app.component</h2>
<code-demo-file-path path="index.html"></code-demo-file-path>

<code-demo-editor
autoFolding
style="height: 50vh"
[fontSize]="18"
[codeDemoHighlight]="code.indexHtmlMatches['index.html']"
Expand All @@ -456,6 +458,7 @@ <h2 i18n>Loading order: index -> main -> app.module -> app.component</h2>
<code-demo-file-path path="bootstrap.ts"></code-demo-file-path>

<code-demo-editor
autoFolding
style="height: 50vh"
[fontSize]="18"
[(ngModel)]="code.angularApp['bootstrap.ts']"
Expand All @@ -467,6 +470,7 @@ <h2 i18n>Loading order: index -> main -> app.module -> app.component</h2>
<code-demo-file-path path="app.module.ts"></code-demo-file-path>

<code-demo-editor
autoFolding
style="height: 50vh"
[fontSize]="18"
[(ngModel)]="code.angularApp['app.module.ts']"
Expand All @@ -476,6 +480,7 @@ <h2 i18n>Loading order: index -> main -> app.module -> app.component</h2>
<code-demo-file-path path="app.component.ts"></code-demo-file-path>

<code-demo-editor
autoFolding
style="height: 50vh"
[fontSize]="18"
[codeDemoHighlight]="code.helloMatches['app.component.ts']"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ <h2 i18n>
<code-demo-file-path path="app.module.ts"></code-demo-file-path>

<code-demo-editor
autoFolding
[fontSize]="30"
[(ngModel)]="code.moduleAnatomy.code"
style="height: 400px;"
Expand All @@ -27,6 +28,7 @@ <h2 i18n>With Angular we build mobile apps using NativeScript or Ionic.</h2>
<div class="box-row">
<div class="box-row-fill">
<code-demo-editor
autoFolding
[fontSize]="30"
[(ngModel)]="code.moduleAnatomy.codeMobile"
[codeDemoHighlight]="[code.moduleAnatomy.matches.importsArr]"
Expand All @@ -43,6 +45,7 @@ <h2 i18n>With Angular you can build VR apps with A-FRAME or WEBGL.</h2>
<div class="box-row">
<div class="box-row-fill">
<code-demo-editor
autoFolding
[fontSize]="30"
[(ngModel)]="code.moduleAnatomy.codeVR"
></code-demo-editor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h1>Custom Events / Passing data from child to parent</h1>
<div column-5>
<code-demo-file-path path="parent.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.exercise1a.code"
[codeDemoHighlight]="code.exercise1a.match"
Expand All @@ -40,6 +41,7 @@ <h1>
<div column-5>
<code-demo-file-path path="child.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.exercise1b.code"
[codeDemoHighlight]="code.exercise1a.match"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ <h2 i18n>
<div class="col-6">
<code-demo-file-path path="person.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.withOutDI.code"
[codeDemoHighlight]="[code.withOutDI.matches.noDI, 'profession']"
Expand All @@ -139,6 +140,7 @@ <h2 class="comparision" i18n>
<div class="col-6" style="margin-left: 10px;">
<code-demo-file-path path="person-di.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.withDI.code"
[codeDemoHighlight]="[code.withDI.matches.constructor]"
Expand All @@ -158,6 +160,7 @@ <h2 class="comparision" i18n>
<div class="col-6">
<code-demo-file-path path="person.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.withOutDI.code2"
[codeDemoHighlight]="[code.withOutDI.matches.noDI]"
Expand All @@ -170,6 +173,7 @@ <h2 class="comparision" i18n>
<div class="col-6" style="margin-left: 10px;">
<code-demo-file-path path="person-di.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.withDI.code"
[codeDemoHighlight]="[code.withDI.matches.constructor]"
Expand All @@ -191,13 +195,15 @@ <h2 i18n>
<div class="col-6">
<code-demo-file-path path="person-di.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.withDI.code"
></code-demo-editor>
</div>
<div class="col-6">
<code-demo-file-path path="person-di.spec.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="15"
[(ngModel)]="code.withDITesting.code"
></code-demo-editor>
Expand Down Expand Up @@ -229,6 +235,7 @@ <h2 i18n>
</h2>
<code-demo-file-path path="unit-converter-service.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[(ngModel)]="code.classAsInjectable.code"
[codeDemoHighlight]="[code.classAsInjectable.matches.injectable]"
></code-demo-editor>
Expand All @@ -246,6 +253,7 @@ <h2 i18n>
</h2>
<code-demo-file-path path="app.module.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
[(ngModel)]="code.provideInjectable.code"
[codeDemoHighlight]="[
code.provideInjectable.matches.providers,
Expand All @@ -266,6 +274,7 @@ <h2 i18n>Consume the Injectable in the component</h2>
path="unit-conversion.component.ts"
></code-demo-file-path>
<code-demo-editor
autoFolding
[(ngModel)]="code.consumeInjectable.code"
[codeDemoHighlight]="[code.consumeInjectable.matches.constructor]"
></code-demo-editor>
Expand Down
16 changes: 14 additions & 2 deletions apps/codelab/src/app/codelabs/angular/pipes/pipes.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ <h2>
<!-- PIPES WITH ARGUMENT -->
<div *slide id="argument-pipes" milestone="Pipes">
<h1>Pipes with arguments:</h1>
<code-demo-editor [(ngModel)]="code.argumentPipes.template" language="html">
<code-demo-editor
autoFolding
[(ngModel)]="code.argumentPipes.template"
language="html"
>
</code-demo-editor>
<div class="info" milestone="Pipes">
To add parameters to a pipe, append a colon ( : ) followed by the
Expand All @@ -94,14 +98,19 @@ <h1>Pipes with arguments:</h1>
<!-- PIPES AS FILTERS -->
<div *slide id="pipes-as-filters" milestone="Pipes">
<h1>Using custom pipes to filter data</h1>
<code-demo-editor [(ngModel)]="code.filterPipes.template" language="html">
<code-demo-editor
autoFolding
[(ngModel)]="code.filterPipes.template"
language="html"
>
</code-demo-editor>
</div>

<!-- CREATING A PIPE -->
<div *slide id="crating-pipe" milestone="Pipes">
<h1>Creating a pipe</h1>
<code-demo-editor
autoFolding
[fontSize]="25"
[(ngModel)]="code.creatingAPipe.template"
[codeDemoHighlight]="code.creatingAPipe.matches.exportClass"
Expand All @@ -114,6 +123,7 @@ <h2>A pipe is a class decorated with pipe metadata.</h2>
<div *slide id="pipeTransform" milestone="Pipes">
<h1>Creating a pipe</h1>
<code-demo-editor
autoFolding
[fontSize]="25"
[(ngModel)]="code.creatingAPipe.template"
[codeDemoHighlight]="code.creatingAPipe.matches.pipeTransform"
Expand All @@ -126,6 +136,7 @@ <h2>The pipe class implements the PipeTransform interface.</h2>
<div *slide id="pipe-transform-method" milestone="Pipes">
<h1>Creating a pipe</h1>
<code-demo-editor
autoFolding
[fontSize]="25"
[(ngModel)]="code.creatingAPipe.template"
[codeDemoHighlight]="code.creatingAPipe.matches.method"
Expand All @@ -141,6 +152,7 @@ <h2>
<div *slide id="pipe-decorator" milestone="Pipes">
<h1>Creating a pipe</h1>
<code-demo-editor
autoFolding
[fontSize]="25"
[(ngModel)]="code.creatingAPipe.template"
[codeDemoHighlight]="code.creatingAPipe.matches.decorator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ <h1>Structural directives ngIf</h1>
<div>
<code-demo-file-path path="before"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="fontSize"
[minLines]="3"
language="html"
Expand All @@ -120,6 +121,7 @@ <h2>Desugars into</h2>
<br /><br />
<code-demo-file-path path="after"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="fontSize"
[minLines]="3"
language="html"
Expand All @@ -133,6 +135,7 @@ <h1>Structural directives ngFor</h1>
<div>
<code-demo-file-path path="before"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="fontSize"
[minLines]="3"
language="html"
Expand All @@ -143,6 +146,7 @@ <h2>Desugars into</h2>
<br /><br />
<code-demo-file-path path="after"></code-demo-file-path>
<code-demo-editor
autoFolding
[fontSize]="fontSize"
[minLines]="3"
language="html"
Expand All @@ -156,6 +160,7 @@ <h1>Angular MicroSyntax</h1>
<div>
<code-demo-file-path path="before"></code-demo-file-path>
<code-demo-editor
autoFolding
language="text"
readonly="false"
[fontSize]="fontSize"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ <h2 i18n>Below are more types we can use</h2>

<code-demo-file-path path="types.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
style="height: 400px;"
language="typescript"
[lineNumbers]="false"
Expand All @@ -239,6 +240,7 @@ <h2 i18n>
</h2>
<code-demo-file-path path="puppies.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
style="height: 400px;"
language="typescript"
[lineNumbers]="false"
Expand Down Expand Up @@ -327,6 +329,7 @@ <h2 i18n>

<code-demo-file-path path="puppy.ts"></code-demo-file-path>
<code-demo-editor
autoFolding
style="height: 400px;"
[codeDemoHighlight]="[code.classDescription.matches.exportMatch]"
language="typescript"
Expand Down
2 changes: 1 addition & 1 deletion libs/code-demos/src/lib/shared/monaco-config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const MONACO_DEFAULTS = {
lineNumbers: false,
automaticLayout: true,
fontSize: 12,
folding: false,
folding: true,
minimap: {
enabled: false
}
Expand Down