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. CMSIS Example - Mail and Message

    /*---------------------------------------------------------------------------- * RL-ARM - RTX *----- ...

  2. JDBC概述以及几种驱动程序

    JDBC(Java DataBase Connectivity,数据库连接)是用来执行SQL的Java API.开发人员可以使用这些标准API来连接和操作数据库 JDBC是Java的规范,考虑到规范的 ...

  3. c# 轻量级 ORM 框架 之 DBHelper 实现 (三)

    周末了比较清闲,把自己的orm框架整理了下,开源了. 已经做出来的东西通常感觉有些简单,一些新手或许听到"框架"一类的词觉得有些"高深",简单来说orm就是把a ...

  4. Codeforces Round #312 (Div. 2) A. Lala Land and Apple Trees 暴力

    A. Lala Land and Apple Trees Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/cont ...

  5. Android 开发中使用Intent传递数据的方法

    Activity之间通过Intent传递值,支持基本数据类型和String对象及 它们的数组对象byte.byte[].char.char[].boolean.boolean[].short.shor ...

  6. iOS开发——UI篇Swift篇&UIDatePicker

    UIDatePicker //返回按钮事件 @IBAction func backButtonClick() { self.navigationController?.popViewControlle ...

  7. android Unable to instantiate application

    最近一段时间在做项目时候遇到一个错误老是解决不了,log如下: FATAL EXCEPTION: main12-11 09:08:53.922 E/AndroidRuntime( 1227): jav ...

  8. css中postion的fixed与absolute区别详解

    fixed:固定定位,参照位置是浏览器窗口的左上角,即坐标点为(0px, 0px) absolute:绝对定位,参展位置是离当前元素最近的定位方式为fixed,absolute,relative的祖先 ...

  9. 工作随笔记 点击除div自身之外的地方,关闭自己

    <div id="showSelectOptions" style="width:100px;height:100px;background-color:red;b ...

  10. Is an MTD device a block device or a char device?

    转:http://www.linux-mtd.infradead.org/faq/general.html#L_mtd_what Note, you can find Ukranian transla ...