๐ Component Generator
Challenge #26
Information
Welcome to the marvelous world of Nx generators.
Generators are awesome tools that can help you and your team generate code more quickly, especially for pieces of code that you use frequently. Inside an enterprise project, you often have to create components that look similar. And most of the time, you end up copy/pasting other components. In Nx, you can create this boilerplate in a simple command using generators.
Statement
The goal of this challenge is to create a generator that will create all the boilerplate of a component for you.
Below are the end result of your generator for a UserComponent
associated with a @ngrx/component-store
.
Options
- name : name of your component/store/service
- createService: flag to tell if a http service should be created
- yes : create as below
- no: donโt create the inject/import/effect/function call (anything related to the service call)
- inlineTemplate: flag to decide if template should be inline or in a separate file
user.component.ts
user.store.ts
user.service.ts
user.model.ts