I just started learning Angular, and when I tried to write a small demo, I got an error. . .
html:
js:
Error report:
------New error message= =#----
Rewritten according to @张博汉's method
Still getting the same error
Then I put ng-app="myApp"
Reported a new error T^T
Cannot be used directly
function
来定义controller
Reference: https://docs.angularjs.org/guide/controller
Hold
ng-app
改成ng-app="myApp"
ah, dearHow did the original poster solve the problem? Urgent, waiting online