I'm creating an application that uses angularJS and I'm new to this library. My problem is that when I see the way it does $router
I understand that there is some way I can also route other angular elements like controllers, services, factories, etc. Does anyone have a solution for me to do something like this:
angular.module("app", ["app.controllers"])
.config(function($stateProvider) {
$stateProvider
.state("contato", {
url : "/contato",
templateUrl: "templates/contato.html",
//isso daqui que precisava
controller: "contatoCtrl",
controllerUrl : "controllers/contatoCtrl.js",
factory: "contatoFtry",
factoryUrl : "factories/contatoFtry.js",
service: "contatoSrv",
serviceUrl : "service/contatoSrv.js"
});
});