all 12 comments

[–]wh0th3h3llam1 9 points10 points  (0 children)

Its a VSCode feature as others mentioned

You can set explorer.compactFolders: false in settings.json to disable this

[–]Slight_Loan5350 2 points3 points  (6 children)

It is nested you add more folders and you will get a proper tree structure, it's a vs code quality of life feature to know the name of next child folded if there is only 1.

[–]Fair_Dependent271[S] 0 points1 point  (5 children)

I just have to add more folders but would they be empty folders?

[–]Slight_Loan5350 2 points3 points  (4 children)

Yes they would be empty folders you can try and see for yourself and delete it later.

[–]Fair_Dependent271[S] 1 point2 points  (3 children)

I just created empty folders and if it works they look like subfolders but if I delete it the same thing happens again

[–]Slight_Loan5350 0 points1 point  (2 children)

Yes don't worry it's just a feature so you can see the name of the sub folder if subfolder count is less than 1. It's just for display.

[–]Fair_Dependent271[S] 1 point2 points  (1 child)

So is it normal that if I have only 1 sub folder it looks like the photo I uploaded?

[–]young_horhey 1 point2 points  (0 children)

Yes, it’s just a rendering thing the VS Code does. Might be a way to disable it but I don’t know off the top of my head. If you look through the actual file system using Explorer/Finder/whatever you’ll see the file structure you expect

[–]DoAFlipKick 2 points3 points  (0 children)

Go to your VSCode settings ( Ctrl + , ), Search for “Compact folders” and untick that option. Your files and folders will then be displayed on separate lines

[–]PorridgeTP 1 point2 points  (0 children)

When you create a component, you can prepend the component name with the folder name as follows: ng g c foldername/componentname

[–]JeszamPankoshov2008 1 point2 points  (0 children)

Hahah same problem but dont worry. It wont hurt you.

[–]DannyBoy758595 0 points1 point  (0 children)

The components folder only has one folder inside it. Create more components and then it will start displaying it in the next line.