Angularjs load templates with directive -
i have directive lets me insert chat component. loads template required.
mod.directive('chat', function () {   return {     replace: true,     templateurl: '/tmpl/chat/chat',   } })   but problem template needs additional includes:
.chat   .chatheader(ng-include="'chatheader'")   .chatlog(ng-include="'chatlog'")   partials:
script( type="text/ng-template", id='chatlog')  .chatmsg(ng-include="'chatmsg'", ng-repeat='chatmsg in chatlog')  script( type="text/ng-template", id='chatheader')   h3 chat   how load includes? used put partials in same file base chat template if use replace: true that's no longer allowed.
what's standard angular way load included partials?
using ng-include valid. issue facing because template partial not have 1 root element. here plunk working version of describing: http://plnkr.co/wy1a3t1udkolbqxr9o22
Comments
Post a Comment