The pipe generator (ionic g pipe) creates an example pipe. Within the @Pipe decorator the name is set to 'my-pipe'. The dash within that name is not allowed. Chrome console log says 'unexpected token'. Without the dash, everything works.
Which Ionic Version? 1.x or 2.x
2.0.0.beta7
CLI is 2.0.0-beta.25
I confirm bug is still present in beta8
Hello, i just tested this issue with the latest version of the ionic beta cli (beta.32) and it seems to be generating the correct pipe name now with no -. Thanks for using Ionic!
Still broken for me in 2.0.0-beta.32
I do
ionic g pipe SbzSmartDate
and end up with a pipe named sbz-smart-date which is invalid.
@martinjbaker Could you provide me with the output from ionic info from within your project directory? Thanks, this should help in troubleshooting.
Sure:
Cordova CLI: 5.4.1
Gulp version: CLI version 3.8.11
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.8.6
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.11.1
Xcode version: Xcode 7.3.1 Build version 7D1014
This bug is still present, I've fixed it in my fork, and I'd like to submit a PR.
Just figured out the generator was moved to https://github.com/driftyco/ionic-app-generators.
Hello. I'm getting the same error when trying to install ionic (npm install -g ionic)
Any clue on how to resolve this ?
I have still this problem in
"ionic-angular": "2.0.0-rc.3",
Confirm, the problem is still present with 2.0.0-rc.3:
ionic g pipe test: pipe name is 'test' [correct]
ionic g pipe mytest: pipe name is 'mytest' [correct]
ionic g pipe MyTest: pipe name is 'my-test' [incorrect]
ionic info:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed
Bug still present in Ionic 2.0.0 final
Yes, bug is still reproduced in Ionic 2.0.0 final:
ionic g pipe test: pipe name is 'test' [correct]
ionic g pipe mytest: pipe name is 'mytest' [correct]
ionic g pipe MyTest: pipe name is 'my-test' [incorrect]
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.