angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Unable to create angular 4 application

Open ghost opened this issue 9 years ago • 4 comments

Versions

Angular CLI: 1.5.3
Node: 8.4.0
OS: linux x64
Angular: 

Repro steps

  • was creating new app using ng new app-name --ng4
  • gives error ng4 is not defined

Observed behavior

It should create a angular 4 application

Desired behavior

any other alternative to create a angular 4 application using angular cli?

ghost avatar Nov 22 '17 06:11 ghost

i guess thats something possible with old cli cos i'm getting this The option '--ng4' is not registered with the new command. Run ng new --help for a list of supported options. when i run ng new app-name --ng4 yoi

mkamranhamid avatar Nov 22 '17 10:11 mkamranhamid

The --ng4 flag existed briefly on older CLI versions right after Angular 4 was released, and we've since removed it.

You can change the generated app to use Angular 4 instead by editing the generated package.json and changing the versions.

We encourage you to use the lates Angular version though. There isn't much benefit to using older Angular versions.

filipesilva avatar Nov 23 '17 11:11 filipesilva

@filipesilva

"ng new" is evidently unstable, so I would not use the new "ng new" source files with an old package.json. It might work today but not tomorrow. What I do is copy an old project directory that was created with the older "ng new --ng4" that used to work.

We need to be careful about recommending an upgrade to the latest Angular. The Angular 4 community has made a tremendous investment in components that provide deep data interaction. I like seeing Tour of Heroes working in Angular 5, and it's clear that Angular 5 has the potential to support Angular 4 components more fully. But a lot of developers need the more advanced components today and can't wait to see what happens with Angular 5.

Surely Google appreciates the community investment in Angular 4. So it's really sad to see Google taking out Angular 4 features. "ng new" seems like such a simple utility, so it's hard to imagine the advantage of ending support for a basic, documented option like "--ng4". It is unfortunate that something as simple as creating a new Angular 4 project is now incrementally more difficult.

guify avatar Dec 22 '17 18:12 guify

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.