Beginner Angular.js

Source: Internet
Author: User

<!doctype html>
Ng-app>

<meta charset= "Utf-8"/>
<title>angular</title>
<script src= "Angular.js"/></script>

<body>
Your Name: <input type= "text" ng-model= "yourname " placeholder= "World" >
Hello {{Yourname | | | ' World '}}!
Hello {{' World '}}
</body>

Introduce angular.js to tag Ng-app inside HTML. The result of the output is Hello world.

Angular's two-way binding concept, binding ng-model= "Yourname",Plarceholder as the default value.

The input result of Hello {{' world '} is Hello world.

Note that the content marked with the double curly braces {{}} is the expression that is bound in the greeting, which is a simple string ' world '. Hey, this is the official wording. I got it straight here. Because this is my first study, write it down first.

Hello {{Yourname | | | The output of ' world '} is: When the text box defaults to world, the output is Hello world.

If you re-enter it, it will be updated in real-time to the text you entered, good magic.

Then learn angular.js together.

Beginner Angular.js

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.