6
Answers

How to use 2 controllers in angularjs

Ankit  Shukla

Ankit Shukla

7y
254
1
Hello,
 
I am using controller like this (with dependency):
 
" angular.controller('StaffController', function ($scope, $http) {  }" 
 
for Inserting data.
 
I need to add 1 more controoker like this (without dependency):
 
" angular.controller('StaffController', function ($scope) { }"  
 
how can I use both of them ?
 

Answers (6)