Angular Harsha Vardhan Page 1
What is Angular?
• Most popular frontend framework to create maintainable web applications.
• Completely re-write of AngularJS.
• Developed by Google.
• Angular CLI enables you to create things faster.
Goals and Advantages of Angular
Angular Harsha Vardhan Page 2
Code Compilation Process
Do’s and Don’ts of Angular
Don’ts:
Never perform DOM manipulations directly in Angular Components, to make the "application
logic" independent of "design logic" and make it unit testable.
Never write JavaScript code in Angular Templates.
Never write Business logic in Components.
Avoid using jQuery to manipulate DOM elements.
Do’s:
✓ Always use Routing and Modules.
✓ Prefer Routing Guards and JWT for Authentication & Security.
✓ Always manipulate "application data" by writing the "application logic" in the components.
✓ Always place global css styles in "styles.css" file and local css styles in "component.css" file.
✓ Always write "REST-API calls (AJAX)" and Business Logic in Services only; and return Observables
from Services.
✓ Prefer to use Bootstrap [or equivalent].
✓ Always use CSS-pre processor, such as SCSS.