【发布时间】:2014-03-10 06:25:26
【问题描述】:
/**
* Created with JetBrains WebStorm.
* User: Faizan
* Date: 3/7/14
* Time: 6:09 PM
* To change this template use File | Settings | File Templates.
*/
angular.module("myApp",[])
.controller("CtrlParent",function($scope){
$scope.ParentFunc= function(){
alert("This is Parent");
// $scope.$on("hello");
}
})
.controller('CtrlBigChild',function($scope){
$scope.BigChildFunc= function(){
alert("This is Big Child");
// $scope.$on("hello");
}
})
.controller('CtrlChildOne',function($scope){
$scope.ChildOneFunc= function(){
alert("This is Child One");
// $scope.$on("hello");
}
})
.controller('CtrlChildTwo',function($scope){
$scope.CtrlChildTwoFunc= function(){
alert("This is Child Two");
// $scope.$on("hello");
}
})
.controller('CtrlChildOneChild',function ($scope){
$scope.ChildOneChildFunc= function(){
alert("This is Child one's Child");
// $scope.$on("hello");
}
})
.controller('CtrlChildTwoChild',function($scope){
$scope.ChildTwoChildFunc= function(){
alert("This is Child Two's Child");
// $scope.$on("hello");
}
})
1:加载资源文件失败:///C:/Users/Faizan/WebstormProjects/AngularJS%20emit%20broadcase%20controller/js/controller.js.js
2:未捕获的错误:[$injector:modulerr]http://errors.angularjs.org/1.2.10/$injector/modulerr?p0=myApp&p1=Error%3A%…rJS%2520emit%2520broadcase%2520controller%2Fjs%2Fangular.min.js%3A17%3A431 )
【问题讨论】:
-
使用服务器,
http://。
标签: javascript angularjs controller