0
我正在使用Angular.js单击按钮来更改身体的背景。一切似乎都很好,但仍然没有运行。更改单击背景的身体 - AngularJS
HTML:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<body data-ng-app="" data-ng-style="alpha">
<button data-ng-click="alpha={background:'red'}">Click Me</button>
</body>
</html>
参考:
https://docs.angularjs.org/api/ng/directive/ngStyle