Tuesday, April 28, 2020

Ques

Write a Program Swap two number using 3rd Variable.
                                                     &
 Write a Program Swap two number  with out using 3rd Variable 
                                                     &
 Write a Program Swap two number  with out using 3rd Variable & + ,-
   &
 Write a Program Swap two number  with out using 3rd Variable & + ,-,*,/



Comment & mail
Prakashmishra.niit@gmail.com
                                                   




AngularJS Class 2

AngularJS Extends HTML

AngularJS extends HTML with ng-directives.
The ng-app directive defines an AngularJS application.
The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
The ng-bind directive binds application data to the HTML view.

There are many integrated development environments you can use for AngularJS development, some of the popular ones are mentioned below. In our example, we are using Webstorm as our IDE.
  1. Webstorm
  2. Sublime Text
  3. AngularJS Eclipse
  4. Visual Studio

AngularJS First Example

1.First  Create a Html page 

<html>  
<head>  
.  
.  
</head>  
<body>  
.  
.  
</body>  
</html>  

2. Second, you need to include the AngularJS JavaScript file in the HTML page so we can use AngularJS:

<html>  
<head>  

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


3. Third Create Controller 
<html lang="en">  
<head>  
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>  
</head>  
<body>
  
<script>  
angular.module("myapp", [])  
    .controller("HelloController", function($scope) {  
        $scope.helloTo = {};  
        $scope.helloTo.title = "World, AngularJS";  
    } );  
</script>  
</body>  

4. then Create View 

<html lang="en">  
<head>  
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>  
</head>  
<body ng-app="myapp">  
<div ng-controller="HelloController" >  
<h2>Hello {{helloTo.title}} !</h2>  
</div>  
  
<script>  
angular.module("myapp", [])  
    .controller("HelloController", function($scope) {  
        $scope.helloTo = {};  
        $scope.helloTo.title = "World, AngularJS";  
    } );  
</script>  
</body>  


Controller Part


<script>  
angular.module("myapp", [])  
    .controller("HelloController", function($scope) {  
        $scope.helloTo = {};  
        $scope.helloTo.title = "World, AngularJS";  
    });  
</script>  
</html>  


View Part

<div ng-controller="HelloController" >  
<h2>Hello {{helloTo.title}} !</h2>  
</div>


AngularJS Class 1

What is AngularJS

Angular JS is an open source JavaScript framework that is used to build web applications. It can be freely used, changed and shared by anyone.
Angular Js is developed by Google.
It is an excellent framework for building single phase applications and line of business applications.
This framework is used for developing mostly Single Page applications.
It can be added to an HTML page with a <script> tag.

AngularJS Features

  1. Dependency Injection
  2. Data Model Binding
  3. Model View Controller
  4. Writing less code
  5. Testing
Note:- Unit Testing ready – The designers at Google not only developed Angular but also developed a testing framework called "Karma" which helps in designing unit tests for AngularJS applications.


AngularJS Architecture

MVC stands for Model View Controller. It is a software design pattern for developing web applications. It is very popular because it isolates the application logic from the user interface layer and supports separation of concerns.


  • The Controller represents the layer that has the business logic. User events trigger the functions which are stored inside your controller. The user events are part of the controller.
  • Views are used to represent the presentation layer which is provided to the end users
  • Models are used to represent your data. The data in your model can be as simple as just having primitive declarations. For example, if you are maintaining a student application, your data model could just have a student id and a name. Or it can also be complex by having a structured data model. If you are maintaining a car ownership application, you can have structures to define the vehicle itself in terms of its engine capacity, seating capacity, etc.
  • Routing – Angular can take care of routing which means moving from one view to another. This is the key fundamental of single page applications; wherein you can move to different functionalities in your web application based on user interaction but still stay on the same page.
  • Two-way binding – Angular.js keeps the data and presentation layer in sync. Now you don't need to write additional JavaScript code to keep the data in your HTML code and your data later in sync. Angular.js will automatically do this for you. You just need to specify which control is bound to which part of your model.
Hii , Prakash Mishra here
Please like & Follow



https://www.youtube.com/channel/UC92k5U7ALw7cSmIB9pglGKA