vertx-guide-for-java-devs icon indicating copy to clipboard operation
vertx-guide-for-java-devs copied to clipboard

Update Angular.js to Angular

Open FrancescoBorzi opened this issue 7 years ago • 11 comments
trafficstars

Chapter 10 "Client-side web application using AngularJS." still refers to the old AngularJS (which is no longer actively developed). What about updating it to the new Angular? Would PRs be accepted to do it?

FrancescoBorzi avatar Nov 19 '18 15:11 FrancescoBorzi

Yes PRs are welcome!

jponge avatar Nov 20 '18 20:11 jponge

@jponge I started to have a look into this

I see that in the step-9 directory there is a redeploy.sh script which deploys everything (including the web client app). However it is not clear to me how the client app (located in /step-9/src/main/resources/webroot) is being served.

FrancescoBorzi avatar Nov 28 '18 20:11 FrancescoBorzi

@FrancescoBorzi here https://github.com/vert-x3/vertx-guide-for-java-devs/blob/master/step-9/src/main/java/io/vertx/guides/wiki/http/HttpServerVerticle.java#L67

jponge avatar Nov 29 '18 08:11 jponge

@jponge yes I was looking at that piece of code and I'm wondering where we are referencing the webroot directory? sorry I'm completely new to Vert.x

FrancescoBorzi avatar Nov 29 '18 08:11 FrancescoBorzi

This is by default, but this can be overridden https://vertx.io/docs/apidocs/io/vertx/ext/web/handler/StaticHandler.html#create-java.lang.String-

On 29 Nov 2018, at 09:49, Francesco Borzì [email protected] wrote:

@jponge yes I was looking at that piece of code and I'm wondering where we are referencing the webroot directory? sorry I'm completely new to Vert.x

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jponge avatar Nov 29 '18 08:11 jponge

ok, thanks a lot for your answer!

FrancescoBorzi avatar Nov 29 '18 11:11 FrancescoBorzi

@jponge what's the best way to enable CORS in step-9 ? I need it for development purposes

FrancescoBorzi avatar Dec 01 '18 17:12 FrancescoBorzi

@jponge I've finished implementing the demo app for step-9.

You can find the source code here: https://github.com/FrancescoBorzi/vertx-guide-client-app

I've tried to keep the behaviour, code and logic similar to the old app whenever possible.

Before I start editing the book chapter, I kindly ask you to review the code. If you think it's good enough, I'll start adjusting the book chapter.

FrancescoBorzi avatar Dec 02 '18 19:12 FrancescoBorzi

I am no modern Angular expert, so it looks good to me.

That's a lot of files, can't it be made smaller?

jponge avatar Dec 07 '18 10:12 jponge

@jponge we could get rid of e2e directory and maybe also of the unit tests (*.spec.ts) since we don't really need it. Then I don't know what else we can remove. What do you say?

FrancescoBorzi avatar Dec 07 '18 11:12 FrancescoBorzi

The simpler, the better :-)

jponge avatar Dec 10 '18 08:12 jponge