- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 111字
- 2021-07-15 17:05:36
Local variables and bindings in templates
A template is a view that deals with the UI part of an application that is written in HTML. First we will see the syntax differences for One-way Data Binding.
AngularJS:
<h1>Book Details:</h1> <p>{{vm.bookName}}</p> <p>{{vm.authorName}}</p>
Angular:
<h1>Book Details:</h1> <p>{{bookName}}</p> <p>{{authorName}}</p>
Both the code snippets show the One-way Data Binding that binds the book and author name to the UI using the double-curly braces. However, the AngularJS prefixes with the alias of controller when referring the properties of the controller to bind to the template and Angular does not use prefixes with the alias, as the view or template is associated with the component by default.
推薦閱讀
- Puppet 4 Essentials(Second Edition)
- GAE編程指南
- 精通搜索分析
- Java程序員面試算法寶典
- Xamarin.Forms Projects
- Unreal Engine 4 Shaders and Effects Cookbook
- H5頁面設(shè)計:Mugeda版(微課版)
- 匯編語言編程基礎(chǔ):基于LoongArch
- ExtJS Web應(yīng)用程序開發(fā)指南第2版
- Python Deep Learning
- Visual Basic程序設(shè)計基礎(chǔ)
- jQuery Mobile Web Development Essentials(Second Edition)
- Spark技術(shù)內(nèi)幕:深入解析Spark內(nèi)核架構(gòu)設(shè)計與實現(xiàn)原理
- 一覽眾山小:ASP.NET Web開發(fā)修行實錄
- Thymeleaf 3完全手冊