That I understand, but how to define an url?
Step 1:
app.factory("UrlInit", function ($http) {
$self = this;
return {
urlinit: function (moduleId, moduleName) {
var _sf = $.ServicesFramework(moduleId);
$self.ServiceRoot = _sf.getServiceRoot(moduleName);
.....
and then using $self.ServiceRoot ?
Step 2:
app.factory("Url", function ($http, UrlInit) {
$self = this;
url: function (method) {
return $self.ServiceRoot + method
});
Step 3:
$routeProvider.
when('/Dashboard', {
templateUrl: Url.url("dashboards.html"),
....
Is the above code correct?
Furthermore, what about using _sf.getTabId() in defining the url?