Upgrade Angular Renaissance to Angular 19(Remove standalone flag) (#283)

This commit is contained in:
dinnerhe
2024-11-27 02:51:48 -06:00
committed by GitHub
parent 14e86886d5
commit fc00b4ad84
29 changed files with 5638 additions and 4630 deletions

View File

@@ -1,7 +1,6 @@
import { Component, signal } from "@angular/core";
@Component({
standalone: true,
selector: "app-name",
template: `<h1>Hello {{ name() }}</h1>`,
})

View File

@@ -1,7 +1,6 @@
import { Component, signal } from "@angular/core";
@Component({
standalone: true,
selector: "app-name",
template: `<h1>Hello {{ name() }}</h1>`,
})

View File

@@ -1,11 +1,10 @@
import { Component, computed, signal } from "@angular/core";
@Component({
standalone: true,
selector: "app-doublecount",
selector: "app-double-count",
template: `<div>{{ doubleCount() }}</div>`,
})
export class DoublecountComponent {
export class DoubleCountComponent {
count = signal(10);
doubleCount = computed(() => this.count() * 2);

View File

@@ -1,8 +1,7 @@
import { Component } from "@angular/core";
@Component({
standalone: true,
selector: "app-helloworld",
selector: "app-hello-world",
template: `<h1>Hello world</h1>`,
})
export class HelloworldComponent {}
export class HelloWorldComponent {}

View File

@@ -1,8 +1,7 @@
import { Component } from "@angular/core";
@Component({
standalone: true,
selector: "app-cssstyle",
selector: "app-css-style",
template: `
<h1 class="title">I am red</h1>
<button style="font-size: 10rem">I am a button</button>

View File

@@ -1,7 +1,6 @@
import { Component } from "@angular/core";
@Component({
standalone: true,
selector: "app-colors",
template: `
<ul>

View File

@@ -1,7 +1,6 @@
import { Component, signal } from "@angular/core";
@Component({
standalone: true,
selector: "app-counter",
template: `
<p>Counter: {{ count() }}</p>

View File

@@ -1,11 +1,10 @@
import { afterNextRender, Component, ElementRef, viewChild } from "@angular/core";
@Component({
standalone: true,
selector: "app-inputfocused",
selector: "app-input-focused",
template: `<input type="text" #inputRef />`,
})
export class InputfocusedComponent {
export class InputFocusedComponent {
inputRef = viewChild.required<ElementRef<HTMLInputElement>>("inputRef");
constructor() {

View File

@@ -3,8 +3,7 @@ import { Component, computed, signal } from "@angular/core";
const TRAFFIC_LIGHTS = ["red", "orange", "green"];
@Component({
standalone: true,
selector: "app-trafficlight",
selector: "app-traffic-light",
template: `
<button (click)="nextLight()">Next light</button>
<p>Light is: {{ light() }}</p>
@@ -24,7 +23,7 @@ const TRAFFIC_LIGHTS = ["red", "orange", "green"];
</p>
`,
})
export class TrafficlightComponent {
export class TrafficLightComponent {
lightIndex = signal(0);
light = computed(() => TRAFFIC_LIGHTS[this.lightIndex()]);

View File

@@ -1,11 +1,10 @@
import { Component, OnInit, signal } from "@angular/core";
@Component({
standalone: true,
selector: "app-pagetitle",
selector: "app-page-title",
template: `<p>Page title: {{ pageTitle() }}</p>`,
})
export class PagetitleComponent implements OnInit {
export class PageTitleComponent implements OnInit {
pageTitle = signal("");
ngOnInit() {

View File

@@ -1,7 +1,6 @@
import { Component, OnDestroy, signal } from "@angular/core";
@Component({
standalone: true,
selector: "app-time",
template: `<p>Current time: {{ time() }}</p>`,
})

View File

@@ -2,7 +2,6 @@ import { Component } from "@angular/core";
import { UserprofileComponent } from "./userprofile.component";
@Component({
standalone: true,
selector: "app-root",
imports: [UserprofileComponent],
template: `

View File

@@ -1,7 +1,6 @@
import { Component, input } from "@angular/core";
@Component({
standalone: true,
selector: "app-userprofile",
template: `
<p>My name is {{ name() }}!</p>

View File

@@ -1,7 +1,6 @@
import { Component, output } from "@angular/core";
@Component({
standalone: true,
selector: "app-answer-button",
template: `
<button (click)="yes.emit()">YES</button>

View File

@@ -2,14 +2,12 @@ import { Component, signal } from "@angular/core";
import { AnswerButtonComponent } from "./answer-button.component";
@Component({
standalone: true,
selector: "app-root",
imports: [AnswerButtonComponent],
template: `
<p>Are you happy?</p>
<app-answer-button (yes)="onAnswerYes()" (no)="onAnswerNo()">
</app-answer-button>
<app-answer-button (yes)="onAnswerYes()" (no)="onAnswerNo()" />
<p style="font-size: 50px">{{ isHappy() ? "😀" : "😥" }}</p>
`,

View File

@@ -2,7 +2,6 @@ import { Component } from "@angular/core";
import { FunnyButtonComponent } from "./funny-button.component";
@Component({
standalone: true,
selector: "app-root",
imports: [FunnyButtonComponent],
template: `<app-funny-button>Click me!</app-funny-button>`,

View File

@@ -1,7 +1,6 @@
import { Component } from "@angular/core";
@Component({
standalone: true,
selector: "app-funny-button",
styles: `
button {

View File

@@ -2,7 +2,6 @@ import { Component } from "@angular/core";
import { FunnyButtonComponent } from "./funny-button.component";
@Component({
standalone: true,
selector: "app-root",
imports: [FunnyButtonComponent],
template: `

View File

@@ -1,7 +1,6 @@
import { Component, ContentChild, TemplateRef } from "@angular/core";
@Component({
standalone: true,
selector: "app-funny-button",
styles: `
button {

View File

@@ -3,7 +3,6 @@ import { UserService } from "./user.service";
import { UserProfileComponent } from "./user-profile.component";
@Component({
standalone: true,
imports: [UserProfileComponent],
providers: [UserService],
selector: "app-root",

View File

@@ -2,7 +2,6 @@ import { Component, inject } from "@angular/core";
import { UserService } from "./user.service";
@Component({
standalone: true,
selector: "app-user-profile",
template: `
<div>

View File

@@ -2,7 +2,6 @@ import { Component, signal } from "@angular/core";
import { FormsModule } from "@angular/forms";
@Component({
standalone: true,
imports: [FormsModule],
selector: "app-input-hello",
template: `

View File

@@ -2,7 +2,6 @@ import { Component, signal } from "@angular/core";
import { FormsModule } from "@angular/forms";
@Component({
standalone: true,
imports: [FormsModule],
selector: "app-is-available",
template: `

View File

@@ -2,7 +2,6 @@ import { Component, signal } from "@angular/core";
import { FormsModule } from "@angular/forms";
@Component({
standalone: true,
imports: [FormsModule],
selector: "app-pick-pill",
template: `

View File

@@ -2,7 +2,6 @@ import { Component, signal } from "@angular/core";
import { FormsModule } from "@angular/forms";
@Component({
standalone: true,
imports: [FormsModule],
selector: "app-color-select",
template: `

View File

@@ -1,7 +1,6 @@
import { Component } from "@angular/core";
@Component({
standalone: true,
selector: "app-root",
template: `<h1>Hello World</h1>`,
})

View File

@@ -2,7 +2,6 @@ import { Component, inject } from "@angular/core";
import { UserService } from "./user.service";
@Component({
standalone: true,
selector: "app-users",
template: `
@let vm = userService.state();

View File

@@ -31,7 +31,7 @@
"@angular-eslint/eslint-plugin": "^18.3.1",
"@angular-eslint/eslint-plugin-template": "^18.3.1",
"@angular-eslint/template-parser": "^18.3.1",
"@angular/core": "^18.2.8",
"@angular/core": "^19.0.1",
"@aurelia/router": "2.0.0-beta.22",
"@babel/core": "^7.25.8",
"@babel/eslint-parser": "^7.25.8",

9852
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff