Have core services, resources and other common items under umbraco
third party modules outside of the root umbraco module, but registered in app.js
to access 3rd party service: ecomEditor.controller.js angular.module("umbraco.myeditor", ["ecommerce.services"]).controller("ecom.editor",
function("inventoryFactory"){
do things...
});
best way to setup services and controllers are: .controller("name",[ "service", "dependency", function(s, d){
} ]);
move logic from controllers to services, especcially around navigation
Change /section/page/id to /section/area/page/id to support all section scenarios Have a fallback to defaults?
- Service to load required scripts for a controller using $script
- remove requirejs dependency as it makes things muddy
Angular-app: common/security/interceptor.js , intercept http requests
Use promises pattern for all our services
$http.get(url)
.then(function(response){
return response.data;
}, function(response){
return $q.reject("http failed");
}).then(function(data){
alert("our data:" + data);
})
Usecase: member picker editor, which fetches member-data
Sublime linter