Search code examples
angularjsviewcontrollerroutesng-view

AngularJS: controller for view is not getting invoked


I have an app with two views and two controllers. Only the controller for first view is firing to show the messsage in console. The second controller does not show console message. Here is a link to plunker http://plnkr.co/edit/qrB8Sqri3nOTt8ZErlNH

> No Code, please check plunker

Solution

  • OK, so a big typo in routes.js. Instead of controller I typed contoller (no r after cont) and there is no need to do ',' after controller.

    Feels good to overcome to block after 3 days.. :)