angular controller code not being run

For some strange reason one of my controllers fails to load had no idea why and all others worked fine…
It would just load as normal and sit but the console.log() inside the controller would not output thus suggesting its not being loaded.

 

After some messing around I found that after I renamed Chat to ChatCtrl for my controller name and it seems to work!
Image
Another suggestion might be to include an init functon in the controller.

 

Sam is a passionate web developer, online entrepreneur and investor. In his spare time he enjoys coding, playing chess and reading.

Leave a Reply

Your email address will not be published. Required fields are marked *