博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AngularJS – javascript MVC 框架
阅读量:6256 次
发布时间:2019-06-22

本文共 1708 字,大约阅读时间需要 5 分钟。

is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Out of the box, it eliminates much of the code you currently write through data binding and dependency injection. And it all happens in JavaScript within the browser making it an ideal partner with any server technology.

Angular is what HTML would have been had it been designed for applications. HTML is a great declarative language for static documents. It does not contain much in the way of creating applications, and as a result building web applications is an exercise in what do I have to do, so that I trick the browser in to doing what I want.

The impedance mismatch between dynamic applications and static documents is often solved as:

  • library - a collection of functions which are useful when writing web apps. Your code is in charge and it calls into the library when it sees fit. E.g., jQuery.
  • frameworks - a particular implementation of a web application, where your code fills in the details. The framework is in charge and it calls into your code when it needs something app specific. E.g., knockout, sproutcore, etc.

Angular takes another approach. It attempts to minimize the impedance mismatch between document centric HTML and what an application needs by creating new HTML constructs. Angular teaches the browser new syntax through a construct we call directives. Examples include:

  • Data binding as in {
    {}}.
  • DOM control structures for repeating/hiding DOM fragments.
  • Support for forms and form validation.
  • Attaching code-behind to DOM elements.
  • Grouping of HTML into reusable components.

更多请参考

转载地址:http://qynsa.baihongyu.com/

你可能感兴趣的文章
由bean,及O/R映射文件导出数据库的方法ExportDB()
查看>>
2003加入域提示“用户已存在”
查看>>
基于Hadoop数据仓库Hive1.2部署及使用
查看>>
利用shell计算find命令查出后的总文件大小
查看>>
性能之外:LSI 6Gb/s SAS RAID渠道先行
查看>>
DataGridView打印类
查看>>
【java】实体类中 Set<对象> 按照对象的某个字段对set排序
查看>>
Android Butterknife 8.4.0 使用方法总结
查看>>
横向滑动的HorizontalListView滑动指定位置的解决方法
查看>>
2013百度校招笔试真题以及解析(内存管理及其优缺点总结)
查看>>
自制DbHelper实现自动化数据库交互
查看>>
195.3. fonts 字体
查看>>
2014年度总结2015展望
查看>>
微信小程序之页面路由
查看>>
SAP Batch Management - Price Determination for Batches
查看>>
队列、资源与锁
查看>>
云计算大会第三批议题:金融、医疗等六大行业
查看>>
自动精简配置&重复数据删除核心技术点及其经济效应探究
查看>>
退伍军人建伪基站闯大祸:60万用户断网
查看>>
云计算促进健全现有IT管理体制
查看>>