We have to follow a set style guide for making sure all developers can understand each other ka code
Each “feature” should be in its own module. If a feature involves routing, then based on the number of routes a separate routing.
Pages have to follow the following format:
@Component({
template: `
@if(dataForPage.isLoading()){
// some loading ui
} @else {
// do what ever with dataForPage.value()
}
`,
styles: ``,
imports: []
})
export class SomePage {
someSignal = signal();
#someServ = inject(SomeService);
dataForPage = rxResource({
request: ()=>{
// if you dont want the api to be called for xyz condition,
// return undefined
if(!this.someSignal()) {
return undefined;
}
return {
variable: this.someSignal();
}
},
loader: ({ request: { variable }})=>{
return this.#someServ.someApiCallFn(variable);
}
})
}
```# Problem Statement
# Goal