angular-breadcrumb
                                
                                 angular-breadcrumb copied to clipboard
                                
                                    angular-breadcrumb copied to clipboard
                            
                            
                            
                        ncyBreadcrumb - support for dynamic templateUrl
Hi! I'm currently working on an app that has consist of two submodules (where each module has it's own modules/states) and one of the requirements is that one module should have breadcrumbs displayed in one way, and the other module in another way.
Currently this can't be achieved because the templateUrl can be configured only globally via the $breadcrumb service.
So it would be great if you could set the templateUrl as an attribute and if it's present it would be loaded.
Usage example: A.html:
<div ncy-breadcrumb template-url="path/to/breadcrumbsA.html></div>
<ui-view></div>
B.html:
<div ncy-breadcrumb template-url="path/to/breadcrumbsB.html></div>
<ui-view></div>
This can be achived if the templateUrl of the directive definition object changes from:
templateUrl: $breadcrumb.getTemplateUrl(),
to:
templateUrl: function (el, attrs) {
  return attrs.templateUrl || $breadcrumb.getTemplateUrl();
},
Hi,
Can we have the url of the state to be overrided if needed to ?
Can you give an example or a use case where you would use that? And I think this isn't related to angular-breadcrumbs, but more of a ui-router "thing".
State 1 )
$stateProvider
        .state('state1', {
            url: '^/{catId}B?name&location',
            ncyBreadcrumb: {
                parent: 'home',
                label: '{{breadCrumb}}'
            },
State 2 )
$stateProvider
        .state('state2', {
            url: '^/{catId}/{dogId}B?name&location',
ncyBreadcrumb: {
                parent: function ($scope) {
                    return $scope.isSingle ? 'home' : 'state1';
                },
                label: '{{breadCrumb}}'
            }
In State 2, as I navigate from home > state 1 > state 2. The Url for state 1 would be 'cat123B?name=a&location=mel' when I'm in state 2, so I don't want the query parameters to be attached and want the state 1 url to be cat123B
You should open a seperate issue for that 'cause it doesn't relate to this issue.
ok sure, thanks. Have already opened.