All Questions
Tagged with angularjs-directive angularjs-ng-include
65 questions
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="...
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">
...
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 ...
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....
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="...
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() {
...
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:
<...
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', ...
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()"&...
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 ...
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 ...
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....
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....
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 ...
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 ...