Before starting to write the code, let us first understand Angular.js.
Angular.js
This is a library like jQuery. A Single Page Application (SPA) is one in which we have a shell page and we can load multiple views into that. In a SPA we can load the initial content upfront and then the various views or the little kind of mini-web pages can be loaded on the fly and embedded into the shell.
It is based on,
- Directives
- Data Binding Expressions
Use the following procedure to write the code with Angular.js.
Step 1. Create an empty ASP.NET website named "Angular_JS".
Step 2. Add a page of HTML into it named "Example1".
Step 3. Download Angular.js from the link Angularjs and save it to your website.
Note. I am using Angular.min.js on this website.
Step 4. After adding the Angular.js to the website, write the script tag that will access the Angular file.
Step 5. Now write the code using Directives and Data binding expressions on the page.
Step 6. Run the page.
Now when you type any text in the TextBox, it will automatically show after the string "Hi, you are typing" like.
Great; you have now done it successfully.