Where do I store interfaces and enumerators such as ones in the picture? They are specific to a component, or more broadly, a module.

Follow

Hmm, so this Tour of Heroes example app that the docs walk you through is storing it at the module directory level, with the naming convention <feature>.ts.

Is this the recommended way?

stackblitz.com/angular/bxrgjae

@celia same, opinionated. The "ng create" offers a set of default conventions but nothing stops you from rolling your own.

@bekopharm I see. I'd like to stick to the conventions/defaults tho. Seems like enums get created at module with feature.enum.ts, and models/classes with feature.ts.

@celia You may find that the defaults of ng are a "moving target" :-)

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.