Skip to content

Commit

Permalink
feat(angular): update each app
Browse files Browse the repository at this point in the history
  • Loading branch information
thetaPC committed Sep 8, 2023
1 parent 4d6f005 commit 09e51f4
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 31 deletions.
2 changes: 1 addition & 1 deletion angular-standalone/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@ionic/angular": "7.3.4-dev.11694102380.128deb56",
"ionicons": "^7.0.0",
"ionicons": "7.1.3-dev.11694203763.11b7e8aa",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
Expand Down
7 changes: 2 additions & 5 deletions angular-standalone/official/blank/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { Component, EnvironmentInjector, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';

@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
standalone: true,
imports: [CommonModule, IonApp, IonRouterOutlet],
imports: [IonApp, IonRouterOutlet],
})
export class AppComponent {
public environmentInjector = inject(EnvironmentInjector);

constructor() {}
}
7 changes: 2 additions & 5 deletions angular-standalone/official/list/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { Component, EnvironmentInjector, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';

@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
standalone: true,
imports: [CommonModule, IonApp, IonRouterOutlet],
imports: [IonApp, IonRouterOutlet],
})
export class AppComponent {
public environmentInjector = inject(EnvironmentInjector);

constructor() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2>
<ion-note>{{ message.date }}</ion-note>
<ion-icon
aria-hidden="true"
name="chevron-forward-outline"
name="chevron-forward"
size="small"
*ngIf="isIos()"
></ion-icon>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { provideRouter } from '@angular/router';
import { IonItem, IonLabel, IonNote, IonIcon } from '@ionic/angular/standalone';
import { ViewMessagePage } from '../view-message/view-message.page';

import { MessageComponent } from './message.component';
Expand All @@ -11,7 +10,7 @@ describe('MessageComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [IonItem, IonLabel, IonNote, IonIcon, MessageComponent, ViewMessagePage],
imports: [MessageComponent, ViewMessagePage],
providers: [provideRouter([])]
}).compileComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { RouterLink } from '@angular/router';
import { Platform } from '@ionic/angular/common';
import { IonItem, IonLabel, IonNote, IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import { chevronForwardOutline } from 'ionicons/icons';
import { chevronForward } from 'ionicons/icons';
import { Message } from '../services/data.service';

addIcons({ chevronForwardOutline });
addIcons({ chevronForward });

@Component({
selector: 'app-message',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ion-item>
<ion-icon
aria-hidden="true"
name="person-circle-outline"
name="person-circle"
color="primary"
></ion-icon>
<ion-label class="ion-text-wrap">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { provideRouter } from '@angular/router';
import { IonHeader, IonToolbar, IonButtons, IonBackButton, IonContent, IonItem, IonIcon, IonLabel, IonNote } from '@ionic/angular/standalone';

import { ViewMessagePage } from './view-message.page';

Expand All @@ -10,7 +9,7 @@ describe('ViewMessagePage', () => {

beforeEach(async () => {
TestBed.configureTestingModule({
imports: [IonHeader, IonToolbar, IonButtons, IonBackButton, IonContent, IonItem, IonIcon, IonLabel, IonNote, ViewMessagePage],
imports: [ViewMessagePage],
providers: [provideRouter([])],
}).compileComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { ActivatedRoute } from '@angular/router';
import { Platform } from '@ionic/angular/common';
import { IonHeader, IonToolbar, IonButtons, IonBackButton, IonContent, IonItem, IonIcon, IonLabel, IonNote } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import { personCircleOutline } from 'ionicons/icons';
import { personCircle } from 'ionicons/icons';
import { DataService, Message } from '../services/data.service';

addIcons({ personCircleOutline });
addIcons({ personCircle });

@Component({
selector: 'app-view-message',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { IonApp, IonSplitPane, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet } from '@ionic/angular/standalone';

import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
TestBed.overrideComponent(AppComponent, {
add: {
imports: [RouterTestingModule, IonApp, IonSplitPane, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet]
imports: [RouterTestingModule]
}
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonContent } from '@ionic/angular/standalone';

import { FolderPage } from './folder.page';

Expand All @@ -11,7 +10,7 @@ describe('FolderPage', () => {
beforeEach(async () => {
TestBed.overrideComponent(FolderPage, {
add: {
imports: [RouterTestingModule, IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonContent]
imports: [RouterTestingModule]
}
});

Expand Down
8 changes: 2 additions & 6 deletions angular-standalone/official/tabs/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import { Component, EnvironmentInjector, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';

@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.scss'],
standalone: true,
imports: [CommonModule, IonApp, IonRouterOutlet],
imports: [IonApp, IonRouterOutlet],
})
export class AppComponent {
public environmentInjector = inject(EnvironmentInjector);

constructor() {}
}

0 comments on commit 09e51f4

Please sign in to comment.