yuu-eguci / angular-experiment

Want to practice angular-cli + SPA + MPA + i18n + import different external css files in each component.
0 stars 0 forks source link

Specification formulation: is it possible to make this with Angular? #1

Closed yuu-eguci closed 4 years ago

yuu-eguci commented 4 years ago

My image

This image is not what I have to make as it is. I want to make it as common and simple as possible.

(2020-01-19)html-mock

Specification

Is it possible to make them below with Angular? If some things are not appropriate, comment please!

Make three pages(three urls)

URL import css SPA
/ index.css YES
/page1 page1.css YES
/page2 page2.css NO

i18n

Separate each i18n message in each component, or in external json file.

Questions

Avalonalan commented 4 years ago

Reply to 1: Well, your draft is correct. Both pages 1 and 2 behave as components of the root page so it is common. I'm not sure how independent you mean here. If you just mean that page 2 uses different CSS files, you just import particular CSS files for page 2 and you can do it.

Reply to 2: Sure, you can make your URLs be more easily understandable as you want. For this image,I think it is good enough for users to understand what kind of languages they choose.

Hope it helpful.

yuu-eguci commented 4 years ago

@Avalonalan

Regarding to 1: How independent I mean here

I mean that Page2 is not included in SPA system. When you move between Index page and Page1, your client doesn't send HTTP request, but Javascript switches page contents. When you go to Page2, your client does normal transition and send HTTP request. When you go back from Page2 to Index page, you don't use SPA but do normal transition.

Does this make sense?

Regarding to 2: Change url from / to /en/

If this is easy and common, I wanna change the specification.

Updated the image

72678575-8cf75880-3aea-11ea-805c-1bc7d172004c

Avalonalan commented 4 years ago

For 1: According to your description, the independent page you mean here is to send an HTTP request and go to Page 2. Also, you think what SPA does just switches static page content. If you think so, it's not correct. When you go to different pages with SPA, the page content can also be got by sending HTTP requests.

For 2: It's not a big deal for you to do that. Also, Google recommends developers to do that. FYI, https://support.google.com/webmasters/answer/182192?hl=en#1

yuu-eguci commented 4 years ago

@Avalonalan

Thank you!

For 1

I understand that we can send HTTP request even when we go to the different pages using SPA. And that's not what I really mean here.

But I will start the project anyways. When I code and make a pull request, please review!

For 2

Good! I understand what Google says and I agree with it. Thank you for the link.

Updated image

(2020-01-22)html-mock


That's the end of this issue. Thank you @Avalonalan !