Answer the question
In order to leave comments, you need to log in
What is the correct way to describe AngularJS controllers in different files?
Hello!
I write in the itemsController.js file:
angular.module('SampleApp').controller('ItemsCtrl', function ($scope) {
//Тут какой-то код
});
angular.module('SampleApp').controller('UsersCtrl', function ($scope) {
//Тут уже другой код
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question