0

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.

1 Answer 1

1

@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) {
   ...
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.