var moduleA = angular.module("ModuleA", []); moduleA.controller("MsgController", function ($scope) { $scope.Message = "測試一下"; })
<body ng-app="ModuleA"> <div ng-controller="MsgController"> {{ Message }} </div> </body>