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

Upgrade to Angular 4 #83

Closed
artlowel opened this issue Mar 27, 2017 · 9 comments
Closed

Upgrade to Angular 4 #83

artlowel opened this issue Mar 27, 2017 · 9 comments

Comments

@artlowel
Copy link
Member

Angular 4 has been released.

A little background info: Angular 3 never existed, and the step from Angular 2 to 4 is a lot smaller than the step from 1 to 2 was. It's comparable DSpace 3 in that regard. You can find the reasoning behind the change here

This blogpost gives an overview of what's new, and how to migrate.

In our case migration won't be quite as simple as it is explained in that blogpost, because of Universal. Angular Universal used to be a separate project, but is included in Angular 4 now, so our dependencies and likely also a lot of the universal specific files (server.ts, node.module.ts, browser.module.ts, …) will need to change.

Universal starter, the boilerplate project we started from, has an open issue to migrate to 4: angular/universal-starter#376

@ghost
Copy link

ghost commented Mar 27, 2017

Here are some things I noticed will change:

  • server.ts and server.aot.ts will change considerably, will now use the new view engine
  • when @angular-cli is up to date, will only require one server file, should be named main.server.ts
  • only require one client.ts, should be named main.browser.ts
  • will no longer need to compile sass manually, sass-loader will work with AoT and Universal
  • OpaqueToken will become InjectionToken<T> and no longer need to use @Inject
  • no longer need workarounds or polyfills

Here is a project that has contributions from the universal-starter developers:
https://github.com/FrozenPandaz/ng-universal-demo

Here is a pull request showing how the redux state can be put into universal cache and retrieved from there:
FrozenPandaz/ng-universal-demo#5

This project also has a superior webpack setup and decomposition. Worth looking into.

@ghost
Copy link

ghost commented Mar 27, 2017

We should also move from ng2-translate to ngx-translate.

Here is a translation loader for Universal: https://gist.github.com/ocombe/593d21598d988bf6a8609ba5fc00b67e

This allows the server to user the file system instead of http to get the translation files.

@nix1947
Copy link

nix1947 commented Apr 7, 2017

Personal Fellings:
What I think is, Developer productivity is killed by these trends, and, what I think personally, is google angular project is one of the flops open source project that I have ever seen. and I am fade up with these frequent release.

Are DSpace developer are thinking about adopting another js framework like react? which is comparatively stable than angular.

@tdonohue
Copy link
Member

tdonohue commented Apr 7, 2017

@nix1947 : no, the DSpace developers will not be switching away from Angular (to some other JS framework). We went through a detailed analysis of platforms (not just JS frameworks) and our analysis resulted in the selection of Angular for the next DSpace UI. See this page for the details of our analysis of platforms and various prototypes on various frameworks: https://wiki.duraspace.org/display/DSPACE/DSpace+UI+Prototype+Challenge

@ghost
Copy link

ghost commented Jun 5, 2017

@ghost
Copy link

ghost commented Jun 13, 2017

@tdonohue tdonohue added the ready label Jul 5, 2017
@tdonohue tdonohue assigned ghost and unassigned artlowel Jul 5, 2017
@tdonohue
Copy link
Member

tdonohue commented Jul 5, 2017

@WWelling : Now that OR2017 is behind us, I've moved this Upgrade to Angular 4 ticket into the "Ready" column. If you are still interested in claiming this and moving it forward rapidly (in the next week or two), this would be the ideal time to do so...as I anticipate very little development activity on the Angular UI in next few weeks.

@ghost
Copy link

ghost commented Jul 6, 2017

@tdonohue I will give it a try. Should be able to get it done by mid next week. If more urgent anyone else who is willing can give it a try as well.

@tdonohue
Copy link
Member

tdonohue commented Jul 6, 2017

@WWelling : That timeline sounds fine. If for some reason you aren't able to get to it, let me know, or unassign it from yourself. But, as you seem to have the most immediate experience with Angular 4, I suspect this may be easiest for you to implement, if you can get to it next week. Thanks!

artlowel added a commit that referenced this issue Jul 20, 2017
Angular upgrade: this connects to #83 and this connects to #86
4science-it referenced this issue in 4Science/dspace-angular Feb 17, 2022
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

No branches or pull requests

3 participants