How to pass parameters to an AngularJS controller on creation?

Posted by Andre Scott | Updated on

How to pass parameters to an AngularJS controller on creation? I answered this to Yes you absolutely can do so using ng-init and a simple init function.

Here is the example:

HTML

JavaScript


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers