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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -