Angular CLI: 1.5.3
Node: 8.4.0
OS: linux x64
Angular:
ng new app-name --ng4It should create a angular 4 application
any other alternative to create a angular 4 application using angular cli?
i guess thats something possible with old cli cos i'm getting this
The option '--ng4' is not registered with the new command. Runng new --helpfor a list of supported options.
when i run ng new app-name --ng4 yoi
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
"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.
Most helpful comment
@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.