Skip to content

Angular 2 #1869

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

Open
2 of 3 tasks
Awk34 opened this issue May 7, 2016 · 56 comments
Open
2 of 3 tasks

Angular 2 #1869

Awk34 opened this issue May 7, 2016 · 56 comments
Assignees

Comments

@Awk34
Copy link
Member

Awk34 commented May 7, 2016

After everything @ ng-conf 2016, I now have a plan on transitioning the generator to Angular 2.

Requires:

  • Modules (webpack)
  • upgrade adapter
  • New router documentation
@Koslun
Copy link
Member

Koslun commented May 11, 2016

Care to share the general outline of your plan? Is it simply first getting Webpack / Browserify / SystemJS in place and then a big bang approach with creating an alternative implementation using Angular 2? And envisioning keeping Angular 1 or Angular 1 and 2 hybrid?

Other than various blog posts and Angular 2 docs, inspirational projects one might wanna glance at:

@Awk34 Awk34 mentioned this issue May 13, 2016
@Awk34
Copy link
Member Author

Awk34 commented May 14, 2016

I'll be initially removing Bower and opting for Webpack (I would eventually like to support SystemJS as well). I wanted to do this a while ago, but it's a large overhaul. Then I'll set up the upgrade adapter and move components over piece-by-piece. This will make the transition easier, as well as allow for generator users to see exactly how it would be done in one of his/her own apps. Then eventually a full cut-over. I spoke with Igor about Flow support with Angular 2, but there were some reasons I won't get into as to why that got pushed off. At the conference, Brad pretty much said that Angular 2 is production ready for most people, so that was another big deciding factor.

@macneib
Copy link
Contributor

macneib commented May 19, 2016

Not trying to stir the pot here, but why wouldn't now be a good time to commit to a single task runner? There are a lot of shops that just use npm now for task running, so providing Gulp is kind of a nice bonus, and Grunt seems like excessive work to keep it up to date. At the time this project was started there was only Grunt, but now it seems like we're past that and can move on.

btw: I still use grunt often, but for the sake of alleviating pressure on the maintainers, and being a lean && mean scaffolding project, one task runner should be good enough. no?

Thoughts?

@Awk34
Copy link
Member Author

Awk34 commented May 20, 2016

@macneib oh, you don't know how much I'd like to ditch Grunt, but look at this chart:

screenshot-analytics google com 2016-05-20 10-06-40

Now probably would be a good time to commit to Gulp, but I wonder how the users of the generator would react.

@Awk34
Copy link
Member Author

Awk34 commented May 20, 2016

FYI #1911

@macneib
Copy link
Contributor

macneib commented May 20, 2016

@Awk34 here's a possible idea, perhaps communicating clearly well in advance where everyone can see it that grunt deprecation is coming then you could measure to see if users are in fact beginning the migration process.

could you console a message in the generator or a warning when selecting Grunt/Gulp that support 'may' be discontinued at a specific version or date?

people with already existing grunt projects won't be affected, however using an tiny bit of FUD may be effective at migrating new projects to one task runner. just an idea.

@Awk34
Copy link
Member Author

Awk34 commented May 20, 2016

FUD = Fear, uncertainty and doubt (I had to look that one up, although I hope it doesn't exactly apply here)

I think this sounds like a reasonable plan

@macneib
Copy link
Contributor

macneib commented May 20, 2016

FUD <- for lack of a better term. Apologies, I don't mean to suggest scaring people out of grunt, but a clear warning with time to prepare would be fair warning to everyone.

Edit: Migrating to ng2 is a significant undertaking. Bower is being tossed and no one has objected thus far. I think users appreciate things are going to change, and streamlining the project to make that happen sooner rather than later would be the priority IMHO.

@Awk34
Copy link
Member Author

Awk34 commented May 20, 2016

I plan on maintaining 3.x.x for the forseeable future, at least

@macneib
Copy link
Contributor

macneib commented May 20, 2016

Will ng2 be in 4.x.x?

I just rolled an angular-cli based project last night, and I think it's still too early to use, however I think we all can agree that pre-positioning this generator to be 'ng2-ready' would be kind of a nice thing.

@Awk34
Copy link
Member Author

Awk34 commented May 20, 2016

@macneib the plan right now is to release webpack + ng1 with 4.0.0, and ng2 with 5.0.0

@mayeaux
Copy link

mayeaux commented May 21, 2016

I agree about the grunt point, I used to like gulp more but I've used grunt so much I'm actually happier with it now.

@Awk34
Copy link
Member Author

Awk34 commented May 22, 2016

I agree about the grunt point, I used to like gulp more but I've used grunt so much I'm actually happier with it now.

Do you mean the other way around?

@Koslun
Copy link
Member

Koslun commented May 22, 2016

I also agree with dropping support for Grunt for the 4.x.x release with a deprecation or/and recommendation of gulp over grunt in this release. And as @Awk34 said, try to get a 3.x.x maintenance release working for some time.

Looking at the PR for webpack support (#1892) I think upgrading will invoke so many breaking changes that the argument about having Grunt around for backwards compatibility kind of falls apart anyway.

So think it more comes down to how much the generator's users prefer grunt over gulp. I'd speculate the preference is generally due how this generator, and by extension many of its users, have used grunt in the past. Which in turn made many of them more comfortable with that, such as @mrmayfield. Especially with the months the gulp option was quite unstable.

But on @macneib point, dropping Grunt means dropping considerable overhead and allow us to get to a ng2-ready state a lot faster I think. And I do think most people would prefer a ng2-ready generator over however much they prefer grunt. With Angular 2 offering so many potential benefits over Angular 1. Save for depending on old Angular 1 code I think it definitely makes a lot more sense to start Angular 2 projects now than Angular 1. If not the current users prefer it I'd bet a lot of other people would.

Either way I do think it's ultimately up to the contributors, as long as we're not racking in lots of donations or something. Anyone else can always pitch in and contribute to getting a grunt version going as well.

@mayeaux
Copy link

mayeaux commented May 22, 2016

@Awk34

Do you mean the other way around?

Nope, I'm more comfortable with grunt now, after having originally started with gulp.

@Koslun
Copy link
Member

Koslun commented May 22, 2016

@Awk34

Do you mean the other way around?

Nope, I'm more comfortable with grunt now, after having originally started with gulp.

Yeah I think that's actually what he meant. As both @Awk34, @macneib and myself rather settled on dropping support for grunt in favor of gulp so we can get the generator working with Angular 2 faster.

@macneib
Copy link
Contributor

macneib commented May 23, 2016

So the interesting question is: "would you trade grunt for faster access to ng2"
IMHO yes.

@mrmayfield made the point that he's comfortable with both grunt and gulp although prefers grunt. I think accommodative features like having both grunt and gulp around is one of the many nice aspects about this generator project.

Here's the catch, when asked, @Awk34 indicated in his own words that he would like to ditch grunt to simplify the maintenance overhead of this project. And as long as it's clearly communicated to somewhere so everyone knows this is happening then I think that's reasonable to drop grunt support for now. It also means the release cadence for this project would be faster. (not that it isn't fast now, but it can always be faster :) )

I'm just one user, and everyone has different preferences, restrictions and use cases, but IMHO this conversation should be geared towards how this generator is going to stay current to support new projects going forward as versus staying true to already generated projects. In that context, and given how much work needs to be invested, it's probably sensible sense to get leaner and commit to one task runner and perhaps once the dust settles someone could bring grunt back in if someone is so inclined.

again, just my two cents.

@Awk34
Copy link
Member Author

Awk34 commented Jun 21, 2016

Latest:

screenshot-analytics google com 2016-06-21 12-04-55

@macneib
Copy link
Contributor

macneib commented Jun 22, 2016

@Awk34 hehehe

@Awk34
Copy link
Member Author

Awk34 commented Jun 30, 2016

Looks like the deprecation warning is working. Here's the past week:

untitled

@mayeaux
Copy link

mayeaux commented Jun 30, 2016

👍 I'm someone who pointed out in the past maybe we want to use Grunt, but Gulp is fine honestly, they are both very similar I feel pretty proficient in both.

@dmarcelino
Copy link

As @macneib pointed out earlier in #1869 (comment) the key question is would you trade grunt for faster access to ng2? and I believe most people will answer "yes" to that. I only know gulp from what I read and I would gladly make the leap from grunt if that means getting Angular 2 sooner.

@Awk34
Copy link
Member Author

Awk34 commented Jul 21, 2016

@dmarcelino Gulp will be the only choice for 4.0.0

@fcagalj
Copy link
Contributor

fcagalj commented Sep 24, 2016

@Awk34 just say if you need any help to speed up process. I really appreciate whole team effort, but generator is few steps behind at the moment, while seizing Angular2.

@Awk34
Copy link
Member Author

Awk34 commented Sep 24, 2016

@fcagalj I have mainly been waiting to add Angular 2 support since a lot has been in flux between RC versions. I have a personal hybrid app that was using up to version RC.4, and RC versions after that completely broke quite a few things. Now that Angular 2.0.0 is stable, I won't have to worry about accounting for a bunch of huge breaking changes.

@Awk34
Copy link
Member Author

Awk34 commented Sep 24, 2016

@fcagalj the areas that I could use help in are fixing bugs and working on documentation.

@fcagalj
Copy link
Contributor

fcagalj commented Sep 24, 2016

Off course @Awk34 , just point some details...

@Awk34
Copy link
Member Author

Awk34 commented Sep 24, 2016

@fcagalj any open issues marked as 'bug' (or any other open issues, really), and anything in the 'Development' section of the docs (moving around the app, making new routes, new endpoints, etc.)

@Awk34
Copy link
Member Author

Awk34 commented Sep 28, 2016

If you'd like to help test out the ng1/ng2 hybrid app:

git clone https://github.com/angular-fullstack/generator-angular-fullstack.git
cd generator-angular-fullstack
git checkout ng2-hybrid
npm install
npm link

Then you should be good to go to run yo angular-fullstack in a test dir and try out the hybrid ng1/ng2 app generation.

@monad98
Copy link

monad98 commented Sep 28, 2016

got this error.

npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the iltorb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs iltorb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls iltorb
npm ERR! There is likely additional logging output above.

Edit: It was Xcode license problem. sorry.

@aabm00
Copy link

aabm00 commented Sep 29, 2016

thank you very much for letting me know !!! : )

2016-09-28 19:31 GMT+02:00 Andrew Koroluk [email protected]:

If you'd like to help test out the ng1/ng2 hybrid app:

git clone https://github.com/angular-fullstack/generator-angular-fullstack.gitcd generator-angular-fullstack
git checkout ng2-hybrid
npm install
npm link

Then you should be good to go to run yo angular-fullstack in a test dir
and try out the hybrid ng1/ng2 app generation.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1869 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB8lSSo5WRWuXjQjgFTJeddi5zGIsvjbks5quqRrgaJpZM4IZV93
.

@Awk34
Copy link
Member Author

Awk34 commented Sep 29, 2016

Please comment here with any feedback. I'm hoping to get it released soon (works with default options mostly right now)

@MatthewTrout
Copy link

Getting a bunch of errors with ng2-bootstrap, has this been tested? Will make sure my environment is not to blame before I start posting stacktraces

@Awk34
Copy link
Member Author

Awk34 commented Sep 29, 2016

@MatthewTrout I've only tested using the generator's default settings, so if you selected anything different, that might be the cause. Anyhow, details and stack traces are always welcome.

@Awk34 Awk34 mentioned this issue Nov 3, 2016
@liu0fanyi
Copy link

I've done these...

git clone https://github.com/angular-fullstack/generator-angular-fullstack.git
cd generator-angular-fullstack
git checkout ng2-hybrid
npm install
npm link

after yo angular-fullstack, still get ”angular“: “~1.5.5” in package.json...

@Koslun
Copy link
Member

Koslun commented Nov 18, 2016

@liu0fanyi Considering it's supposed to be a hybrid between angular 1 and 2 I would expect both to be present in package.json.

@liu0fanyi
Copy link

@Koslun I get it...but how could I switch to angular 2? I'm new in angular...

@csvan
Copy link

csvan commented Nov 20, 2016

@liu0fanyi hybrids are a poor (IMO) solution and really only meant for migrations, If you are starting a new project, consider the Angular2 seed instead for now. I hear there are some generators as well, though i have not tried them.

@Koslun
Copy link
Member

Koslun commented Nov 21, 2016

@liu0fanyi @csvan
Well, I'll agree that you only really ever want to do hybrids if you have to. Meaning if you have an Angular 1 app that's too big to just rewrite in one go, or if you have some angular 1 specific things that are somehow not worth the effort to port yourself. One example could be using Angular Material 1 components. For some people it could also be the login mechanism in this generator.

Whether to use another starter or generator depends mostly on what you need/want. Most other starters are purely client or server setups without some of the features this generator has, such as integrated login.

For a good angular 2 starter right now (client only) I would recommend https://github.com/AngularClass/angular2-webpack-starter or https://github.com/qdouble/angular-webpack2-starter.

Would imagine a future version of the generator being a combination of https://github.com/angular/universal-starter and the aforementioned other starters with a bit of its own magic. Like gulp, browser-sync and the existing back-end. Hope to contribute towards that end next starting next month or start of next year.

@liu0fanyi
Copy link

@csvan @Koslun I get it, thks..

@MarkPieszak
Copy link

@Awk34 If you'd like help with the Universal aspect or have any questions about it let me know, I can help get things setup in those areas if needed!

One thing though, Universal is being moved to Angular Core slated for 4.x, so some APIs could change a tiny bit. (Things like angular2-universal will be in @angular/platform-server instead). But for the most part the universal-starter is a very minimalist version to build off from. There are some things that could be improved upon there of course!

You can track angular/angular#13822 (comment) for more information on the upcoming changes.

Just wanted to give you a heads up!

@Awk34
Copy link
Member Author

Awk34 commented Jan 9, 2017

Hey @MarkPieszak, that would be great! The canary branch is currently using Angular 2.x.

From what I've heard about Angular 4.x.x, not too much should be changing. It would probably just be a minor version bump for this project.

@aabm00
Copy link

aabm00 commented Jan 11, 2017

Hi

I would want to know what's the state of the Angular 2 or 4 version of the generator to work with, and what is the schedule to have a stable version.

Thanks

@Awk34
Copy link
Member Author

Awk34 commented Jan 11, 2017

@aabm00 I've converted the bulk of the main application code in canary to Angular 2.x.x, but there is still plenty to do. Most of the test files haven't been touched. Also some of the configuration options have not been tested by anyone.

I have been quite busy at work (new startup job), and probably won't have much time to develop on this project in the next couple weeks. I'll still be able to respond to issues & approve pull requests, though.

@aabm00
Copy link

aabm00 commented Jan 11, 2017 via email

@MarkPieszak
Copy link

Congrats @Awk34 !

@aabm00
Copy link

aabm00 commented Mar 15, 2017

Hi again.

@Awk34 I suppose you are still very busy at your new job, but do you have any idea or schedule of when a version with angular 2 or 4 will be available?

Thanks.

@albert-92
Copy link
Contributor

@Awk34 A little update would be awesome, since i'm about to start a new project with the generator-angular-fullstack and currently i am wondering whether it is worth waiting a little longer for the Angular 2/4 adaptation?

Thanks!

@Awk34
Copy link
Member Author

Awk34 commented Apr 30, 2017

I have still been quite busy with work, but I've been trying to get to working on the 5.0.0 version when I can. I've been working on it today, getting different configurations more stable. There's still plenty of work to be done, though. I had originally been working with ui-router w/ Angular 2, but it seems like it's still in beta, which is a bit concerning. So the project needs to be updated to Angular 4.x.x (which shouldn't be difficult), many of the tests need to be converted/fixed, and the project needs to support the official Angular router.

@albert-92
Copy link
Contributor

Thanks for the update @Awk34 !

@Awk34
Copy link
Member Author

Awk34 commented May 12, 2017

There's a big PR full of fixes for the canary branch if anyone wants to help review: #2563

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

No branches or pull requests