AngularJS 变量不显示
你好,小菜鸟一枚,学习AngularJs过程中,目测是个简单的程序,检查也没有发现错误,但是就是结果有错,求解。
代码如下:
<title>AngularJS First Application</title>
<html ng-app="myApp">
<body ng-controller="TextController">
<p>{{someText.message}}</p>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
<script>
var myAppModul = $.module('myApp', []);
myAppModul.controller('TextController',
function ($scope) {
var someText = {};
someText.message = 'You have started your journey';
$scope.someText = someText;
}
);
</script>
</body>
</html>
结果:
只是
{{someText.message}}