Questions tagged [angularjs-templates]

angularjs-templates are written with HTML that contains Angular-specific elements and attributes. Angular combines the template with information from the model and controller to render the dynamic view that a user sees in the browser., This tag is limited to angular version 1.x. For angular 2.x and above please use angular2-template tag

angularjs-templates are written with HTML that contains Angular-specific elements and attributes. Angular combines the template with information from the model and controller to render the dynamic view that a user sees in the browser.

More Details

97 questions
22
votes
5 answers

Test if an object is an empty object in a AngularJS template

I have a simple object in a controller which can sometimes be empty ({}). app.controller('TestController', function() { var vm = this; vm.testObject = {}; }); I want to hide or show some DOM-elements in the corresponding template when the…
DanEEStar
  • 6,140
  • 6
  • 37
  • 52
10
votes
3 answers

Angular print string array without quotes

I have a simple string array coming from a server: [{"things":["me", "my"]}] In my page, to display the array I have: {{things}} And it prints: ["me", "my"] How do I control the printing, for instance, if I want to eliminate the brackets and…
bmw0128
  • 13,470
  • 24
  • 68
  • 116
6
votes
2 answers

Angular2 dynamically loading a template

I started doing some research into using Angular2 and one of the questions I had that I can't find a solution for. I have a requirement that depending on the data I receive from my model, I wish to load different templates for a given component.…
cjr
  • 520
  • 2
  • 7
  • 22
6
votes
2 answers

Inline `ng-template` not found by `ng-include`

I have a view being loaded with an embedded text/ng-template which is not being found by a ng-include later in the file. The script block sits at the very top of the view file: