Last active
January 21, 2016 20:17
-
-
Save ElyDotDev/0b0fa17d401dfd922129 to your computer and use it in GitHub Desktop.
دوره آموزش AngularJS - مبانی (Basics): http://blog.allii.ir/2016/01/angularjs-beginner-intermediate-course-basics/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html></html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
String equals to Number? {{'1' == 1}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
{{for (i = 0; i < 100; i = i + 1) {i}}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
{{variable = 5; ++variable}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<!-- Invalid AngularJS Expression !--> | |
{{alert("http://blog.allii.ir/")}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
{{"Angular" + "js".toUpperCase() + " FRAMEWORK".toLowerCase()}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
I Have {{variable = 3; (variable > 2) ? "more than ": "less than"}} 2 Apples. | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
{{variable = 1}} === {{variable}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
I'm variable * 3: {{variable = 5; variable * 3}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
Adding number as AngularJS Expression {{1+1}} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
Adding number as AngularJS ng-bind Directive: <span ng-bind="1+1"></span> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div ng-init="myFunction = function(){ return 1; }"> | |
My function return is: {{myFunction()}} | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div ng-init="validVariable = {property1: 'Im a property', arrayProperty: ['1','2']}"> | |
-{{invalidVariable.arrayProperty[1]}}<br/> | |
-{{validVariable.invalidProperty.property1}}<br/> | |
-{{validVariable.arrayProperty[2]}} | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div ng-init="variable1 = 10; variable2 = 5; variable3='Divided By'"> | |
{{variable1}} {{variable3}} {{variable2}}: {{variable1/variable2}} | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div ng-init="variable = 5"> | |
This is my variable: {{variable}}<br/> | |
And my variable * 3 is:<span ng-bind="variable*3"></span> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div ng-init="variable= ['http://','blog','allii','ir']"> | |
My weblog url {{variable[0]}}{{variable[1]}}.{{variable[2]}}.{{variable[3]}} as array: {{variable}} | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div ng-init="variable= {firstNumber: 10, secondNumber: 5, divideText: 'Divided By'}"> | |
{{variable.firstNumber}} {{variable.divideText}} {{variable.secondNumber}}: {{variable.firstNumber/variable.secondNumber}} | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div > | |
Are there just <span ng-bind="1+1"></span> Oranges, or {{1+2}} Apples? | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div id="form_wrapper" ng-init="notSubmitted = true"> | |
<form ng-show="notSubmitted"> | |
<input type="text" name="feedback"/> | |
<input type="submit" value="Submit Feedback"/> | |
</form> | |
<div ng-hide="notSubmitted">Thanks for submitting your feedback!</div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<!-- All Examples Code In This Section Added Here!--> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<div id="form_wrapper" ng-init="notSubmitted = true"> | |
<form ng-show="notSubmitted"> | |
<input type="text" name="feedback"/> | |
<input type="submit" value="Submit Feedback" ng-click="notSubmitted = !notSubmitted"/> | |
</form> | |
<div ng-hide="notSubmitted">Thanks for submitting your feedback!</div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<input type="checkbox" ng-init="checkboxInput = 'Checked'" ng-model="checkboxInput" | |
ng-true-value="'Checked'" ng-false-value="'not Checked'"> | |
My input is "<span ng-bind="checkboxInput"></span>". Change it! | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<input type="checkbox" ng-init="checkboxInput = true" ng-model="checkboxInput"> | |
My input is checked: "<span ng-bind="checkboxInput"></span>". Change it! | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<input type="text" ng-init="textInput = 'Initial'" ng-model="textInput"> | |
My input value is "<span ng-bind="textInput"></span>". Type something! | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<select ng-init="selectOption = 'Happy'" ng-model="selectOption"> | |
<option value="Happy">Happy</option> | |
<option value="Angry">Angry</option> | |
<option value="Sad" selected>Sad</option> | |
</select> | |
You are "<span ng-bind="selectOption"></span>", not?. Please Select! | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- AngularJS 1.4.8 !--> | |
<script src="../src/angular.min.js"></script> | |
</head> | |
<body ng-app> | |
<input type="text" ng-model="textInput"> | |
My input value is "<span ng-bind="textInput"></span>". Type something! | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment