Skip to content

Commit

Permalink
Merge pull request #55 from Rotzbua/chore_standalone_demoapp
Browse files Browse the repository at this point in the history
chore(demo-app): migrate to standalone
  • Loading branch information
emanuelefricano93 authored Jul 10, 2024
2 parents 8ebff72 + 5d0d199 commit 787330d
Show file tree
Hide file tree
Showing 11 changed files with 597 additions and 454 deletions.
2 changes: 2 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
},
"index": "projects/demo-app/src/index.html",
"polyfills": [
"@angular/localize/init",
"zone.js"
],
"tsConfig": "projects/demo-app/tsconfig.app.json",
Expand Down Expand Up @@ -165,6 +166,7 @@
"options": {
"main": "projects/demo-app/src/test.ts",
"polyfills": [
"@angular/localize/init",
"zone.js",
"zone.js/testing"
],
Expand Down
979 changes: 561 additions & 418 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@angular/compiler": "^18.0.4",
"@angular/core": "^18.0.4",
"@angular/forms": "^18.0.4",
"@angular/localize": "^18.0.4",
"@angular/platform-browser": "^18.0.4",
"@angular/platform-browser-dynamic": "^18.0.4",
"@angular/router": "^18.0.4",
Expand Down
4 changes: 1 addition & 3 deletions projects/demo-app/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
imports: [AppComponent],
}).compileComponents();
});

Expand Down
17 changes: 12 additions & 5 deletions projects/demo-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import { Component } from '@angular/core';
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms';

import { NgxTimelineEvent, NgxTimelineEventGroup, NgxTimelineEventChangeSide, NgxDateFormat, NgxTimelineOrientation } from 'ngx-timeline';
import {JsonPipe, NgClass} from '@angular/common';
import {Component} from '@angular/core';
import {UntypedFormGroup, UntypedFormControl, ReactiveFormsModule} from '@angular/forms';
import {NgxDateFormat, NgxTimelineEvent, NgxTimelineEventChangeSide, NgxTimelineEventGroup, NgxTimelineModule, NgxTimelineOrientation} from 'ngx-timeline';

@Component({
selector: 'app-root',
standalone: true,
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
styleUrl: './app.component.scss',
imports: [
JsonPipe,
NgClass,
NgxTimelineModule,
ReactiveFormsModule,
],
})
export class AppComponent {
title = 'demo-app';
Expand Down
7 changes: 7 additions & 0 deletions projects/demo-app/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {ApplicationConfig, provideZoneChangeDetection} from '@angular/core';

export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({eventCoalescing: true}),
],
};
21 changes: 0 additions & 21 deletions projects/demo-app/src/app/app.module.ts

This file was deleted.

10 changes: 6 additions & 4 deletions projects/demo-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import {bootstrapApplication} from '@angular/platform-browser';

import { AppModule } from './app/app.module';
import {AppComponent} from './app/app.component';
import {appConfig} from './app/app.config';

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

bootstrapApplication(AppComponent, appConfig)
.catch((err) => console.error(err));
6 changes: 4 additions & 2 deletions projects/demo-app/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"types": [],
"paths": {
"types": [
"@angular/localize"
],
"paths": {
"ngx-timeline": [
"dist/ngx-timeline/ngx-timeline",
"dist/ngx-timeline"
Expand Down
3 changes: 2 additions & 1 deletion projects/demo-app/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine"
"jasmine",
"@angular/localize"
]
},
"files": [
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": false
Expand Down

0 comments on commit 787330d

Please sign in to comment.