2
I am creating an application that uses Angularjs and I am new to this library. My problem is that when I see the way it makes the $router
i understand that there is a lack of some way that I can also route other angular elements like controllers, services, Factories, etc. By chance someone has some solution for me to do something like:
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"
});
});
I started looking about it and ended up finding the Requirejs, that’s just where I understood this dependency issue that angular makes rs, even so thanks friend, that was the conclusion I also found ;D
– LeandroLuk