javascript - Nested view templates in Angular.js? -


i have in html file part of html code, repeats multiple times ( have multiple tables in html file...)

                <table>                     <thead>                       <tr>                           <th data-field="id">vorname</th>                           <th data-field="name">nachname</th>                           <th data-field="price">anzahlaktien</th>                           <th data-field="action">wert</th>                           <th data-field="action">einkaufsdatum</th>                           <th data-field="action">ort</th>                           <th data-field="action">aktion</th>                       </tr>                     </thead>                      <tbody> // different data 

is possible set "partial view" in angular.js? (like in meteor.js) can include needed wit {{myview}}...

you can use ng-includeto include html partial file. btw there many ways , using directive own templateurl (i think) best approach.

nginclude doc

<div ng-include="'partial.html'"></div> 

directive doc

html:

<my-directive></my-directive> 

js:

.directive('mydirective', function() {   return {     templateurl: 'partial.html'   }; }); 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -