Answer the question
In order to leave comments, you need to log in
Why doesn't ng-controller work when the html template is generated correctly?
Guys, please help. I'm a couple of years behind, only right now I was seized to learn Angular.
I am scratching my head.
Everything breaks for me when I add ng-controller='DemoCtrl' to .helloWorld
In the console, the error DemoCtrl is not a function. In main coffee only DemoCtrl = -> alert('Hello World!'). tmp is generated correctly, as in the markup of the tutorial
First I saw the difference that I add scripts to the end of body. But moving them to head still didn't help.
Angular is connected version 1.3.4
https://jsfiddle.net/L8cqmbbw/
UPD
npm i angular and require angular helped a little better:
The controller with the name 'DemoCtrl' is not registered
Answer the question
In order to leave comments, you need to log in
Well, you need to register it (DemoCtrl) =)))
Isn't Google suggesting anything?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question