![]() The ng-if directive conditions the display of the tag if the name variable actually contains any data.The ng-model directive binds the value of the control to application data and stores it in the name variable.We are loading AngularJS from a CDN as we did in the first example.How about letting the user add a name and have the “Hello”-message customized with that name?Ĭlosely examine this code, type it in your editor and run it in your browser.Īgain, let’s have a look on what’s going on. Let’s see if we can make the AngularJS application to interact with some user generated data. Let’s try something slightly more advanced. You have a basic AngularJS Hello World application. This technique is good to use during the development process but advised against for production code. By pulling AngularJS from a remote server we avoid having to store it loacally on our computers. Ī CDN (Content Delivery Network) is a collection of global servers that caches and delivers content such as images, videos and Javascript files. ![]() ![]() AngularJS outputs data stored in the variable message where the expression is written.The ng-init directive initializes AngularJS application variable message. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |