ncuillery / angular-breadcrumb

Generate a breadcrumb from ui-router's states
http://ncuillery.github.io/angular-breadcrumb/
MIT License
785 stars 183 forks source link

No way to customize ncy-breadcrumb-last #123

Closed freethejazz closed 8 years ago

freethejazz commented 8 years ago

I noticed this when attempting to enable a custom template that binds html, like the example in the documentation. When using the ncy-breadcrumb-last directive, the label shows all of the escaped markup because the directive is hard-coded to use '{{ncyBreadcrumbLabel}}' (https://github.com/ncuillery/angular-breadcrumb/blob/master/src/angular-breadcrumb.js#L242). This greatly limits the ability to use both ncy-breadcrumb-last and custom templates together.

freethejazz commented 8 years ago

I think the simplest approach for dealing with this is to implement options for lastTemplate and lastTemplateUrl that work similar to the way template and templateUrl work now. I'd be happy to take a cut at this if that approach seems reasonable.

ncuillery commented 8 years ago

Hi,

You are right, ncyBreadcrumbLast is less flexible than ncyBreadcrumb and I can't find workaround for this case.

Your approach seems legit to me :+1:

ncuillery commented 8 years ago

Ooops miss click

freethejazz commented 8 years ago

Great! I'll throw a PR your way in the next few days

freethejazz commented 8 years ago

Haven't forgotten about this. #114 complicates this issue a bit, so I may knock that one out first.