下面这段代码:
{{message}}
/**
* Created by Glacier on 2015/7/19.
message-controller-scope.js
*/
function MessageController($scope) {
$scope.message = "This is a model.";
}
显示结果是{{message}};应该显示是This is a model.
为什么显示不成功了?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
孩子,你得angular对象都没有加载进去!!!
我想,问题可能出在
<script src="../../angularv1.min.js"></script>
这句,你看看路径是不是对的
如果angularJS能够引入,那么针对ng-app="app"是可以自己扫描运行的,那么{{message}}你看到的就不是{{message}}了,要么是'This is a model.',要么就是空白一片,要么就是console的报错.