scope是html和单个controller之间的桥梁。rootscope是各个controller中scope的桥梁。用rootscope定义的值,可以在各个controller中使用
ng-app定义了一个angular模块, 每个模块只有一个$rootScope,只有一个$injector,但可以有多个$scope 。
scope是html和单个controller之间的桥梁。rootscope是各个controller中scope的桥梁。用rootscope定义的值,可以在各个controller中使用
ng-app定义了一个angular模块, 每个模块只有一个$rootScope,只有一个$injector,但可以有多个$scope 。