Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
120 views

ng-controller with ng-include doesn't bind correctly

I have this A component, with a.html and a.ts files. Inside a.html, the controller defined in a.ts (AController) is called ar. Also, inside a.html call b.html with ng-include. <div ng-include="...
kvothe838's user avatar
0 votes
0 answers
160 views

Allowing multiple directives to transclude in a recursive template

I am currently receiving a tree of managers and their subordinates from the back end. I'm using a recursive template to display this. <script type="text/ng-template" id="managerTmp"> ...
oxygenplug's user avatar
0 votes
1 answer
136 views

Variable Function Names in Nested Directives

I'm trying to implement nested directives. The inner directive is a button which calls a function in ng-click. The name of the function to be called is defined in the model. To start off with, here ...
old_account's user avatar
1 vote
2 answers
2k views

ng-include is not working

I have create a simple page using AngularJs. When I'm trying to include header.htm in index.html, nothing is appearing in browser. index.html <html> <script src="https://ajax....
Noman Kt's user avatar
1 vote
2 answers
863 views

How to get different ng-model values in ng-include of the same HTML file

There are two html files: index1.html <input type="text" ng-model="model.Name"> <!-- Some complex form !--> index.html <div>Journalist's Details: Name:<div ng-include="...
Anand's user avatar
  • 232
0 votes
1 answer
2k views

AngularJS dynamic template with ng-include and separate template directives

I want to create a div which loads different templates dynamically, based on a context parameter: My "search-results-container" directive: app.directive("searchResultsContainer", function() { ...
tricon's user avatar
  • 313
0 votes
1 answer
121 views

Partials in Angular but not ng-include/directives

There is a piece of code in my angular that is being repeated in two files. I made it a directive so it could be reusable. I'm sending it some data. Let's assume this is the template: <...
Rahul Gupta's user avatar
1 vote
3 answers
162 views

AngularJS ng-include in direcive link doesnt work

I have created a directive with link function that contains an element with ng-include. But this element with ng-include doesn't work. Does anyone know why doesn't work? app.directive('helloWorld', ...
bizkit's user avatar
  • 25
0 votes
1 answer
170 views

AngularJS 1.5 scope in directive ng-include

Here's some code http://jsfiddle.net/miuosh/n6yppypj/ with uploadfile directive. The problem is that I use this <input type="file" file-model="myFile" /> <button ng-click="uploadFile()"&...
miuosh's user avatar
  • 936
0 votes
1 answer
876 views

Need to access scope in ng-include directive

I need to access the form data (ng-model="name") in the parent controller DynamicFormCtrl . How do i access the data input in the form in the DynamicFormCtrl . I am not getting idea how to i access ...
shrestha rohit's user avatar
3 votes
0 answers
596 views

When to use ng-include vs custom directives

I am having a dispute with my co-workers regarding this issue and I would like to know what other angular developers think about using custom directives in angular js. I personally prefer to use ...
dishwasherWithProgrammingSkill's user avatar
2 votes
1 answer
331 views

Dynamic include template angular directive

So I want to make a directive to automatically include tabs and content, but I am unable to get the content stored in partials/tabs/tab[x].html. AvailableTabs - constant defined as an array : myApp....
ka_lin's user avatar
  • 9,412
0 votes
2 answers
540 views

How to use ng-include from code?

I want to use ng-include directive from the code. Something like var html = '<div ng-include="\'myTemplate.html\'"></div>'; $compile(html)($scope); angular.element(document....
Teja's user avatar
  • 133
0 votes
1 answer
1k views

Need to sanitize <ng-include src="url"> but ng-bind-html wants an expression and doesn't accept URLs

I'm writing an application which shows several different kind of devices in a single page and loads external templates depending on the device type. Users will be able to submit custom templates, so ...
darkbasic's user avatar
  • 401
0 votes
2 answers
276 views

Replace ng-include with code equivalent

When composing my view out of various HTML partials, I prefer the declarative approach of placing an ng-include directive in my markup. However a third party widget for a slideShow / carousel that I ...
Martin's user avatar
  • 6,231

15 30 50 per page
1
2 3 4 5