So I’m new to angular and was making a blog website in angular. Right now it has 4 blog posts in total.
What I’m doing right now is I’m storing the title, date, author, image and the whole blog in json files and read them according to the blog I’m visiting. I have one component named blog which which gets rendered according to the JSON data it gets.
I want to know what design philosophy you guys use. Do you have one component named blog post and have static JSON files or do you have each blog a different component.
The problem is if I have each blog different component, then it removes the scalability of blogs, say I add new blogs. But this allows me to have a lot of feature rich web page with images and styles.
If I have each blog, different JSON and a single component; then my website is dynamic but I have to store HTML for each blog in JSON which would be a very big line for JSON and doesn’t feels natural. Also I cannot simply save texts because I want to format web page, have images in the middle, have some text on bold.
Any suggestions?
Aucun commentaire:
Enregistrer un commentaire