javascript - ui bootstrap multiple decorators -


used this link update accordion template. need replace ui bootstrap template carousel. there way can chain decorator functions or should done way? also, if need have various versions of carousel? then?

what have right isn't working:

.config(['$provide', decorate])  function decorate($provide) {   $provide.decorator('accordiongroupdirective', function($delegate) {     var directive = $delegate[0];      directive.templateurl = '/modules/projects/views/admin/templates/accordian.html';      return $delegate;   })   .decorator('carousel', function($delegate) {     var directive = $delegate[0];      directive.templateurl = '/modules/projects/views/admin/templates/carousel.html';      return $delegate;   })  } 

whenever wanted decorate of existing component configuration phase of angular, need append component type name, here going decorate directive, need provider name decorator carouseldirective instead of carousel.

code

.decorator('carouseldirective', function($delegate) {     var directive = $delegate[0];      directive.templateurl = '/modules/projects/views/admin/templates/carousel.html';      return $delegate; }) 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -