Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

New to Angular.js, We have a asp.net MVC 4 View that uses Angular. It can directly be accessed from localHost/Controller/View URL. The view works fine but I am working on adding a new dashboard. For the dashboard I have created a (brand new) partial page in MVC.

And now, I am trying to display the same page appear on dashboard within a div by using (Razor) :

@{Html.RenderAction("Index", "CustomerController");} 

but I'm getting an error that reads :

Error: [ng:areq] Argument 'CustomerNgController' is not a function, got undefined

I did make sure that I am adding a reference to Angular & the .js file that contains the controller above. Still can not figureout the cause for the error.

share|improve this question
add comment

2 Answers

@Ablaze - If you could post some code I'd be glad to look at it. Generally it just means that it can't find it because it hasn't been created yet. Maybe the order of your scripts might be the issue. And make sure the module knows about it too like:

angular.module('myApp').controller('CustomerNgController', function($scope) {
   ...
});
share|improve this answer
add comment

It seems JDash for Asp.Net MVC can help you. It includes an Angular Example.

For official web page visit http://www.jdash.net For MVC dashboard demos visit http://mvc.jdash.net

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.