2023-09-15

Angular

Angular 
AngularJS

https://www.w3schools.com/angular/

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>

<div ng-app="">
<p>My first expression: {{ 5 + 5 }}</p>
</div>

</body>
</html>

 https://github.com/fantazic/online-parser/blob/master/templates/index.html


Angular 2+ (often referred to simply as Angular) and AngularJS are two distinct versions of the Angular framework, and there are significant differences between them. Here are key differences:


Architecture and Language:


AngularJS (1.x): Developed in JavaScript and primarily uses ECMAScript 5 syntax.

Angular (2+): Completely rewritten in TypeScript, which is a superset of JavaScript. TypeScript adds static typing and other features to enhance development.

Modularity:


AngularJS: Uses modules, controllers, and services for organizing code. The concept of dependency injection is present but less robust compared to Angular.

Angular: Built with a modular architecture known as NgModules. The application is structured as a set of modules, making it more modular, maintainable, and scalable.

Two-Way Data Binding:


AngularJS: Relies heavily on two-way data binding, where changes in the model or view are automatically reflected in the other.

Angular: While still supporting two-way data binding, it promotes a unidirectional data flow using property and event binding, which can enhance predictability.

Change Detection:


AngularJS: Uses a less efficient digest cycle for change detection, which can lead to performance issues in complex applications.

Angular: Implements a more efficient change detection mechanism that is optimized for performance.

Directives:


AngularJS: Directives are a central concept for building components and extending HTML. They are often complex and can include both the presentation and behavior.

Angular: Introduces a component-based architecture where components are the building blocks of the application. Components encapsulate both the presentation and behavior.

Routing:


AngularJS: Uses the ngRoute module for routing, but it lacks some advanced features.

Angular: Has a powerful router module that supports lazy loading, nested routes, and other advanced features.

Mobile Support:


AngularJS: Designed without mobile support in mind.

Angular: Designed with mobile support from the beginning, with features like responsive design and touch gestures.

Dependency Injection:


AngularJS: Supports dependency injection but is not as modular as Angular.

Angular: Has a more advanced and modular dependency injection system, making it easier to manage dependencies and promote testability.

Development Tools:


AngularJS: Limited tooling support.

Angular: Comes with a comprehensive set of tools, including Angular CLI, which provides commands for development tasks like scaffolding, testing, and building.

Community and Support:


AngularJS: Mature but gradually declining community support as developers migrate to newer versions.

Angular: Active community support, with regular updates and improvements from the Angular team.

Learning Curve:


AngularJS: Easier learning curve due to its simpler concepts.

Angular: Can have a steeper learning curve, especially for developers new to TypeScript and modern front-end development practices.

When starting a new project, it's generally recommended to use the latest version of Angular for its improved performance, modern features, and ongoing support. However, the choice may depend on project requirements, team familiarity, and existing codebase considerations.

Spring Boot and Angular Full Stack Development


message("Entity created")





[ngClass] = ' badge-success'

df

https://cdn.jsdelivr.net/npm/@angular/core@17.1.1/
https://cdn.jsdelivr.net/npm/@angular/core@12.2.17/bundles/core.umd.js


<script src="https://unpkg.com/@angular/core@12.2.17/bundles/core.umd.js"></script> <script src="https://unpkg.com/@angular/compiler@12.2.17/bundles/compiler.umd.js"></script> <script src="https://unpkg.com/@angular/platform-browser@12.2.17/bundles/platform-browser.umd.js"></script>














No comments: