Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "Angular js 11 am"" #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .idea/dictionaries/welcome.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions AngularApplications/CodingStandardsApp/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var app = angular.module("app",[]);
7 changes: 7 additions & 0 deletions AngularApplications/CodingStandardsApp/controllers/ctrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
app.controller("ctrl",ctrl);
ctrl.$inject=["$scope"];
function ctrl($scope) {
$scope.var_one = "AngularJS+Angular2";
$scope.var_two = "NodeJS";
$scope.var_three = "MongoDB";
}
12 changes: 12 additions & 0 deletions AngularApplications/CodingStandardsApp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en" ng-app="app">

<h1 style="color: red"
ng-controller="ctrl"
ng-bind="var_one+'<==>'+var_two+'<==>'+var_three">
</h1>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular.min.js"></script>
<script src="app.js"></script>
<script src="controllers/ctrl.js"></script>
</html>
29 changes: 29 additions & 0 deletions AngularApplications/DynamicAngularApplication/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en" ng-app="app">
<div ng-controller="ctrl">
<h1 style="color: red" ng-bind="var_one"></h1>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular.min.js"></script>
<script>
var app = angular.module("app",[]);

/*app.controller("ctrl",function ($scope) {
$scope.var_one = "Data From MongoDB Soon....";
});*/


/*
1.Never Take the Annonymus Function while Implementing Project
*/


/*
2. We Must Write the Dependency Injections with the help of $inject.
*/
app.controller("ctrl",ctrl);
ctrl.$inject=["$scope"];
function ctrl($scope){
$scope.var_one = "Data From DataBase Soon...";
}
</script>
</html>
3 changes: 3 additions & 0 deletions AngularApplications/StaticAngularApplication/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory":"bower_components"
}
6 changes: 6 additions & 0 deletions AngularApplications/StaticAngularApplication/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name":"nareshit",
"dependencies":{
"angular":"~1.6.0"
}
}
7 changes: 7 additions & 0 deletions AngularApplications/StaticAngularApplication/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<html lang="en" ng-app>
<input type="number" ng-model="obj_one"> <br><br>
<input type="number" ng-model="obj_two"> <br><br>
<h1 style="color: red" ng-bind="obj_one+obj_two"></h1>
<script src="bower_components/angular/angular.min.js"></script>
</html>
192 changes: 192 additions & 0 deletions AngularApplications/class_notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
AngularApplications.
- By using AngularJS We Can Create Two Types Of Angular Applications.

1.Static Angular Application
2.Dynamic Angular Application.

Static Angular Application.

- If View Won't Interacts with the Controller for Dynamic Data , Then Such Type Of
Angular Application called as Static Angular Application.


Dynamic Angular Application.

- If View Interacts with the Controller for Dynamic Data Then Such Type Of Angular Application
called as Dynamic Angular Application.


bower.
- Bower is the Automation plugin given by the NodeJS , used to download the Required
Resources to Develop web application.

bower components.

1. bower.json
2. .bowerrc

bower.json.
-
- used to write the required dependencies to develop web application.

{
"name":"nareshit",
"dependencies":{
"angular" : "~1.6.0",
"bootstrap" : "~3.3.7"
}

}

.bowerrc
-
- used to locate the path to the resources downloading by using bower.

{
"directory":"bower_components"
}


- we can run the bower components by using NodeJS Command.

>bower install

- when ever we run the "bower" , bower automatically connects with the "GitHub"
with Git Interface tool.

- "~" used to download the latest version of required resources with the help
of GitHub.

- "^" used to download the exact version of required resources with the help of GitHub.

Steps to Create the Static Angular Application.
-

Step 1.
Download the Angular Framework by using bower.


Step 2.
Create the View with following directives.
1.ng-app
2.ng-model
3.ng-bind

index.html
-
<!DOCTYPE html>
<html ng-app>
<input type="number" ng-model="obj_one"> <br><br>
<input type="number" ng-model="obj_two"> <br><br>
<h1 style="color:red" ng-bind="obj_one+obj_two"></h1>
<script src="bower_components/angular/angular.min.js"></script>
</html>

- Framework starts the execution from ng-app directive
- if our application static , we won't specify the logical name for the web application.
- ng-model directive will creates objects in "heap memory" with dynamic data.
- ng-bind directive binds the "model data" to the "view".

Steps to Create the Dynamic Angular Application.
-
Step 1.
Download the Angular Framework by using bower.

Step 2.
Load the Angular Framework.

Step 3.
Declare the logical name for the web application by using ng-app directive.

Step 4.
Declare the Controller by using "ng-controller" directive.


Step 5.
Get the Entire Webpage Control (index.html) / Instantiate the application module


Step 6.
Implement the Controller


---------------------------
CodingStandardsApp
index.html
app.js
controllers
ctrl.js
bower.json
.bowerrc
--------------------------







































































3 changes: 3 additions & 0 deletions Directives/PredefinedDirectives/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory":"bower_components"
}
7 changes: 7 additions & 0 deletions Directives/PredefinedDirectives/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name":"nareshit",
"dependencies":{
"angular":"~1.6.0",
"bootstrap":"~3.3.6"
}
}
Loading