Skip to content
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

Ngrx Schematics: Generate container does not work properly, --help flag is broken. #760

Closed
icepeng opened this issue Jan 29, 2018 · 0 comments · Fixed by #763
Closed

Ngrx Schematics: Generate container does not work properly, --help flag is broken. #760

icepeng opened this issue Jan 29, 2018 · 0 comments · Fixed by #763

Comments

@icepeng
Copy link
Contributor

icepeng commented Jan 29, 2018

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

ng g container feature --reducers reducers/index.ts
The option '--reducers' is not registered with the generate command. Run `ng generate --help` for a list of supported options.

ng g --help
TypeError: Cannot read property '0' of undefined
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-feature',
  templateUrl: './feature.component.html',
  styleUrls: ['./feature.component.css']
})
export class FeatureComponent implements OnInit {

  constructor(private store: Store<any>) { } }

  ngOnInit() {
  }

}

Expected behavior:

--reducers flag has to be registered with the generate command.
Also, generated component has to import Store from @ngrx/store.

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

ng -v

Angular CLI: 1.6.6
Node: 8.9.0
OS: linux x64
Angular: 5.2.2
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router

@angular/cli: 1.6.6
@angular/compiler-cli: 5.0.5
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.6
@schematics/angular: 0.1.17
typescript: 2.6.2
webpack: 3.10.0

packages

"@ngrx/effects": "^5.0.1",
"@ngrx/entity": "^5.0.1",
"@ngrx/router-store": "^5.0.1",
"@ngrx/store": "^5.0.0",
"@ngrx/schematics": "^5.0.0",
"@ngrx/store-devtools": "^5.0.1",

Other information:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant