ionic-team / ionic-team/angular-toolkit

component generator does not respect --changeDetection Flag

Ouverte
#94 12 commentaires 10 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
TypeScript
Étoiles
73
Forks
34
Merge moyen
6 min
PR mergées (30 j)
5

Description

**Steps to Reproduce:**
```
ionic start
npm install @angular/cli@7.3.4
ng g component Test --changeDetection=OnPush --entryComponent
```

**Output:**
Generated component:
```
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-training-options',
templateUrl: './training-options.component.html',
styleUrls: ['./training-options.component.scss'],
})
export class TrainingOptionsComponent implements OnInit {

constructor() { }

ngOnInit() {}

}
```

**My `ionic info`:**
```
Ionic:

ionic (Ionic CLI) : 4.10.3 (C:\Users\distante\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.2
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.3.4
@angular/cli : 7.3.4
@ionic/angular-toolkit : 1.4.0

System:

NodeJS : v10.14.1 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 10
```

**Other Information:**
Using a Pure angular Project `ng g` generates the correct component.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduce the issue with the listed ionic start and ng generate component commands, then compare the Ionic toolkit generator with the Angular CLI generator, which reportedly handles the flag correctly. Trace how the component generator processes --changeDetection=OnPush; done means the generated component reflects the requested change-detection strategy.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
tooling
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.