Difference between JavaScript and AngularJS - GeeksforGeeks

28 Oct, 2020
JavaScript: JavaScript is a lightweight and object-oriented scripting language used to create dynamic HTML pages with interactive effects within a webpage. It is an interpreted scripting language and its code is run in a web browser only and in order to execute and run the code outside the browser we can use Node.js. It is also called a browser’s language and can be used for client-side developments as well as server-side developments. It was developed by Brendan Eich at Netscape and was first released in 1995. 
JavaScript was created in the first place for DOM manipulation. Earlier websites were mostly static after JS was created dynamic Web sites were made.
Functions in JS are objects. They may have properties and methods just like another object. They can be passed as arguments in other functions.
Can handle date and time.
Performs Form Validation although the forms are created using HTML.
No compiler needed.
JavaScript Example:
javascript
<!DOCTYPE html><html> <head>    <title></title></head> <body bgcolor="white">    <p>Paragraph 1</p>    <script type="text/javascript">        document.bgColor = "lightblue";    </script></body><html>
Output:
AngularJS: AngularJS is an open-source front-end web development framework for creating web applications and has great functionality and support. It was released in the year 2010 by the angular team of Google. It is a constantly developing and expanding framework which provides improved methods for developing web applications. It mainly works on the model view controller (MVC) concept for building apps and supports both dependency injection and data binding features. 
Easy to work with: All you need to know to work with AngularJS is basics of HTML, CSS and JavaScript, not necessary to be an expert in these technologies.
Time saving: AngularJS allows us to work with components and hence we can use them again which saves time and unnecessary code.
Ready to use template: AngularJS is mainly plain HTML, and it mainly makes use of the plain HTML template and passes it to the DOM and then the AngularJS compiler. It traverses the templates and then they are ready to use.
AngularJS (version 1.5)  was replaced by Angular (Typescript) in 2016. They are completely different frameworks.  Angular is currently at version 10.
AngularJS Example:
javascript
<!DOCTYPE html><html> <head>    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js">    </script></head> <body>    <center>        <div ng-app="">            <h1>{{txt}}</h1>            <p>                <input type="text" ng-model="txt" />            </p>        </div>    </center></body> </html>
Output:  
Difference between JavaScript and AngularJS :
bunnyram19
tim17
AngularJS-Misc
JavaScript-Misc
AngularJS
Difference Between
JavaScript
Web Technologies
Web technologies Questions
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Auth Guards in Angular 9/10/11
What is AOT and JIT Compiler in Angular ?
Angular PrimeNG Dropdown Component
How to set focus on input field automatically on page load in AngularJS ?
How to make a Bootstrap Modal Popup in Angular 9/8 ?
Difference between BFS and DFS
Class method vs Static method in Python
Differences between TCP and UDP
Difference between var, let and const keywords in JavaScript
Difference between Process and Thread