0% found this document useful (0 votes)
85 views

What Is Angular?

Angular is the most popular frontend framework for building maintainable web applications. It was created as a complete rewrite of AngularJS and is developed by Google. Angular provides goals such as code reusability and testability through its component-based architecture. Developers should avoid directly manipulating the DOM or writing business logic in components, and instead focus application logic in components and make REST API calls and write business logic in services. Key best practices for Angular include using routing and modules, authentication with routing guards and JWT, and separating CSS and JavaScript code.

Uploaded by

saikumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

What Is Angular?

Angular is the most popular frontend framework for building maintainable web applications. It was created as a complete rewrite of AngularJS and is developed by Google. Angular provides goals such as code reusability and testability through its component-based architecture. Developers should avoid directly manipulating the DOM or writing business logic in components, and instead focus application logic in components and make REST API calls and write business logic in services. Key best practices for Angular include using routing and modules, authentication with routing guards and JWT, and separating CSS and JavaScript code.

Uploaded by

saikumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

You might also like