I have a really simple Angular app that I\'ve distilled to the following:
var napp = angular.module(\'Napp\',[\'ngResource\']);
var CompanyCtrl = function($scop
It works for me http://plunker.co/edit/ziLG1cZg8D8cYoiDcWRg?p=preview
But you have some errors in your code:
Your don't seem to have a ngView in your code. The $routeProvider
uses the ngView
to know where it should insert the template's content. So you need it somewhere in your page.
You're specifying your CompanyCtrl
in two places. You should specify it either in the $routeProvider
, or in you template using ng-controller
. I like specifying it in the template, but that's just personal preference.
Although not an error, you're specifying your CompanyCtrl
in the global scope, instead of registering it on your Napp
module using Napp.controller(name, fn)
.
Hope this helps!
You can always go on #angularjs irc channel on freenode: there's always active people ready to help