What happens if the controller name is misspelled?

When the controller name is misspelled, 2 things happen

1, An error is raised. To see the error, use brower develepertools

2, The binding expressions in the view that are in the scope of the controller will not be evaluated

What happens if a property name in the binding expression is misspelled?

Expression evaluation in angular is forgiving, meaning if you misspell a property name in the binding expression, angular will not report any error, It will simply return null or undefined.

How to create module, controller and register the controller with the module, all in one line?

Use the method chaining(链接) mechanism(机制) as shown below

var myApp = angular
.module("myModule",[])
.controller("myController",function($scope){
$scope.message = "create module and controller in one line";
});

part 3 Controllers in AngularJS的更多相关文章

  1. angularjs 不同的controller之间值的传递

    Sharing data between controllers in AngularJS I wrote this article to show how it can possible to pa ...

  2. AngularJS基础总结

    w3shools    angularjs教程  wiki   <AngularJS权威教程> Introduction AngularJS is a JavaScript framewo ...

  3. angularJS和requireJS和angularAMD

    最近因为要用到angularJS开发项目,因为涉及到的静态资源比较多,所以想把js文件通过requireJS来按需加载,这两个框架以前都使用过,但是结合到一起还没有用过,那就试一下,看能否达到目的. ...

  4. (译)AngularJS1.3.0 开发者指南(四) -- 控制器

    理解Controllers 在AngularJS中, Controller是一个Javascript构造函数, 常常被用来扩展 Angular Scope 对象. 控制器通过 ng-controlle ...

  5. ABP框架系列之二十二:(Dynamic-Web-API-动态WebApi)

    Building Dynamic Web API Controllers This document is for ASP.NET Web API. If you're interested in A ...

  6. Angular1.x 基础总结

    官方文档:Guide to AngularJS Documentation   w3shools    angularjs教程  wiki   <AngularJS权威教程> Introd ...

  7. AngularJs学习笔记--Injecting Services Into Controllers

    原版地址:http://docs.angularjs.org/guide/dev_guide.services.injecting_controllers 把service当作被依赖的资源加载到con ...

  8. [译]在AngularJS中何时应该使用Directives,Controllers或者Service

    原文: http://kirkbushell.me/when-to-use-directives-controllers-or-services-in-angular/ Services Servic ...

  9. [AngularJS - thoughtram] Exploring Angular 1.3: Binding to Directive Controllers

    The post we have: http://www.cnblogs.com/Answer1215/p/4185504.html gives a breif introduce about bin ...

随机推荐

  1. 【原创】PostSharp入门笔记

    最近写了一个抓取软件,用户反映软件偶尔会抛异常: 由于当时写代码时没有注意异常处理,大部分方法都没有写try…catch…finally的语句,所以很难找出异常是出在哪个地方,难道要为所有方法加上tr ...

  2. 凸包---HDU 2202

    题意:给N个点,求着N个点中选择三个联的最大的三角形面积! 注意精度:不然OJ上面会超时的 #include<iostream> #include<cmath> #includ ...

  3. Android progressBar 自定义圆形旋转图片

    项目需要中需要更换progressbar的旋转背景,在网上找了几种办法,但是都有各自的问题 于是结合网上所讲,研究了一下终于ok了: 一 首相在drawable文件夹中建立如下旋转动画文件 <? ...

  4. 知数堂MYSQL优化课---CU论坛版主 DBA 博客

    http://www.cnblogs.com/MYSQLZOUQI/category/546261.html

  5. MySQL · 特性分析 · 内部临时表

    http://mysql.taobao.org/monthly/2016/06/07/#rd MySQL中的两种临时表 外部临时表 通过CREATE TEMPORARY TABLE 创建的临时表,这种 ...

  6. 动漫网站基于jquery的横向手风琴特效

    今天给大家分享一款动漫网站基于jquery的横向手风琴特效.这款手风琴特效适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗.效果图如下: 在线预 ...

  7. Coin Test

    描述 As is known to all,if you throw a coin up and let it droped on the desk there are usually three r ...

  8. 【Shell脚本学习17】Shell case esac语句

    case ... esac 与其他语言中的 switch ... case 语句类似,是一种多分枝选择结构. case 语句匹配一个值或一个模式,如果匹配成功,执行相匹配的命令.case语句格式如下: ...

  9. OC之protocol监听器的实现

    画图 图解 代码 总结 一.画图 本人画了一个图(字体和画图水平请忽略) 二.图解 1.首先我们上边是一个按钮的类,按钮当中包括了一条线,这个线是什么呢? 其实难理解就难理解到这条线上了 1⃣️这条线 ...

  10. 《MFC游戏开发》笔记七 游戏特效的实现(一):背景滚动

    本系列文章由七十一雾央编写,转载请注明出处. http://blog.csdn.net/u011371356/article/details/9344721 作者:七十一雾央 新浪微博:http:// ...