Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for angular-route-segment #179

Closed
leoetlino opened this issue Jul 5, 2015 · 2 comments
Closed

Support for angular-route-segment #179

leoetlino opened this issue Jul 5, 2015 · 2 comments

Comments

@leoetlino
Copy link

Would it be possible to add support for angular-route-segment? It is basically a module that builds on ngRoute to provide features similar to ui-router, so the code looks similar to ngRoute (but with more features):

var watchForService = function ($rootScope) {
    return $rootScope.service.id;
};

$routeSegmentProvider
    .when('/', 'dashboard')
    .when('/manage', 'manage')
    .when('/manage/information', 'manage.information')
    .segment('dashboard', {
        resolve: {
            summary: function ($http) {}
        }
    })
    .segment('manage', {
        resolve: {
            service: function ($http) {}
        },
        controller: function ($scope, $http) {}
        watcher: watchForService
    })
    .within()
    .segment('information', {
        watcher: watchForService
    });
  • $routeSegmentProvider.segment({ resolve: function () {} }
  • $routeSegmentProvider.within().segment({ resolve: function () {} } for child route segments
  • $routeSegmentProvider.segment({ controller: function () {} }
  • $routeSegmentProvider.within().segment({ controller: function () {} } for child route segments
  • $routeSegmentProvider.segment({ watcher: function () {} }
  • $routeSegmentProvider.within().segment({ watcher: function () {} } for child route segments

I initially wanted to make a pull request, but wasn't sure if this should be implemented as a plugin or right in ng-annotate-main.js.

Thanks!

@olov
Copy link
Owner

olov commented Jul 17, 2015

I'll be happy to merge a PR with this as an optional (plugin).

@olov
Copy link
Owner

olov commented Jun 8, 2016

#245

@olov olov closed this as completed Oct 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants