javascript - View template compilation in Angular JS -


i writing frontend app in angularjs. using lot of custom directives include templates, f.ex.

<body>     <my-header></my-header>     <site-information></site-information> </body> 

defined in angular app:

var app = angular.module('myapp');  app.directive('myheader', function() {     return {         'restrict': 'e',         'templateurl': '/partials/template.html'     } }); 

and on.

however, useful me, if template include 2 different parts, or "sub-templates", without doing 2 more ajax-requests. in other words, template "compiled" before being shown.

<!-- template.html --> <div class="row">     <div class="col-md-6">          {{ content_one }}     </div> </div> <div class="row">     <div class="col-md-6">          {{ content_two }}     </div> </div> 

is there easy way achieve this?

regards, skovmand.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -