Skip to content

The base framework IOCO use for new Angular projects.

Notifications You must be signed in to change notification settings

WynieCronje/Angular-Framework

 
 

Repository files navigation

IOCO Angular Framework

Required packages

npm i onchange -g
npm i cli-error-notifier -g
npm i concurrently -g
npm i json-concat -g
npm i json-server -g

To Run

  • Clone Repo
  • npm install
  • npm start

Dev Standards

  • All component properties / methods are private if not bound to HTML
  • All Private Methods at the bottom
  • Public Methods do not have public prefix.
- public addUser(user){ ... }
+ addUser(user){ ... }
  • Unused Services have been removed from Component Constructor
  • No Services are public
  • All Service subscriptions are unsubscribed onDestroy
  • Using full names for variables and not, a = x or usr = result.user
  • Link work item for tracking if possible
    • Tip - add #{TaskNumber} to commit message to link for item ie: Resolves #123 Added blah blah or #123 #321 #111
  • Order of code
    • Private Properties
    • Constructor
    • Inputs / Outputs
    • Public Properties
    • LifeCycle hooks
    • Public Methods
    • Private Methods

example:

export class Demo implements OnInit,OnDestroy {
  private subscriptions = new Subscription();
  private userId: string;

  constructor(private someService: SomeService) { ... }

  @Input() test: string;
  @Output() select = ...;

  availableList = [ ... ];

  ngOnInit(): void {
    this.subscriptions.add(this.someService.doServiceCall().subscribe());
  }

  ngOnDestroy(): void {
    this.subscriptions.unsubscribe();
  }

  userSelected() {
    ...
  }

  private doSomething(){ ... }
}

About

The base framework IOCO use for new Angular projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 93.4%
  • JavaScript 3.7%
  • HTML 2.2%
  • SCSS 0.7%