peterjc
December 18, 2016, 8:22am
1
Looking at the Angular2 style guide for file naming conventions the suggestion is that filenames in general follow the convention feature.type.ts
.
When using the ionic -g page Login
following the above, should the filenames generated be
login.page.ts
login.page.html
login.page.sccs
and perhaps similar for services etc
I do see the class name generated is as expected (e.g. LoginPage)
Or perhaps there is a reason this is differing on Ionic2?
I know we can do this manually, but wondering if it is a conscience decision for the CLI not to use this be default?
2 Likes
I raised this a while ago, see issue #6847 .
I think the Ionic guys just prefer a different style.
I would also love to see Ionic following Angular2 style guide - unless there is an explicit reason to deviate from it.
1 Like
I agree, it only ends up hurting the end user, who has to read even more docs about best practises for project structure.
I can’t see any good reason for Ionic’s style.
Wouldn’t a kind of “middle” solution be that the generator templates should be able to be modified somehow? Then everybody can use whatever template structure she wants, right?