466 questions
0
votes
1
answer
34
views
Redirect after including new page in AngularJS
I build my own form via ng-include. After you click "okay" on a page, the next one gets included.
HTML index
<form>
<ng-include src="includedForm"></ng-include&...
0
votes
0
answers
127
views
Why does my AngularJS template loader work with version 1.6.1, but not with 1.7 (or 1.8)?
I'm looking for a way to load ng-templates from a bundled html file to use as src in ng-include.
I found a demo that exactly suited me needs, and is working fine in AngularJS 1.6.1. Unfortunately in ...
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="...
-1
votes
1
answer
671
views
Best practice for replacing ng-include when upgrading from angularjs to angular?
To my dismay angular no longer supports the ng-include directive. My code base uses hundreds of shared partial html files. I cant seem to find any documentation. Can anyone point meet in the right ...
0
votes
1
answer
72
views
Why is pushState disrupted when using ng-include?
When using ng-include, the pushState function is disrupted.
The following is a simple example of this.
<div ng-app="angularApp" ng-controller="angularCtrl">
<div ng-include="templateUrl"...
0
votes
1
answer
327
views
ng-include not loading contents of specified file
I'm currently a beginner - and learning angularJS.
I'm having some difficulty getting a piece of html to load into my main page using ng-include
I have 2 html source files. Both files are located in ...
0
votes
1
answer
440
views
How do I catch the internet disconnected error when loading different views using ng-include
Inside my ng-view, I have included different views using ng-include.
I'm using ng-if to show or hide any view based on the URL parameters.
Inside my ng-view
<div>
header
</div>
<...
0
votes
1
answer
69
views
How to redirect into another html login page using ng-include and ng-click events?
I am new to AngularJs. I have 2 different html pages. I have created a website which have static home page and login page which will access through button. How to load login page using ng-include and ...
0
votes
0
answers
56
views
how to force reload using ng-include
I'm using
<div ng-include = "myController.myVar">.
During the flow of my program, myController.myVar a string generated by the return of a function.
Example:
myController.myVar = MyFunction (...
0
votes
1
answer
2k
views
ng-include doesn't do anything
I'm trying to include some HTML on my software's webpage using ng-include, and I can't seem to get it to work. For now, I am using simplified versions of my end goals for testing purposes.
Relevant ...
0
votes
1
answer
388
views
AngularJS Load html files after log in
Good afternoon everybody,
I have an index.html file that contains all the application views :
I'm trying to know if is it possible to load all the ng-include after user log in and not before ?
My ...
2
votes
0
answers
270
views
AngularJS | Is there any way to remove data-ng-include from AngularJS
I want to remove all data-ng-include tags from my AngulaJS App. I found some answers but none satisfies what I want to do.
I am moving away from AngularJS, and I want to somewhat componentize the ...
1
vote
1
answer
36
views
AngularJS - Binding same scope to multiple copies of a form using ng-include
I have a simple search form which I have it included in two different pages using ng-include directive. I would like to bind them both to the same scope in such a way that when the user navigates ...
0
votes
0
answers
38
views
error when using ng-include in angularjs to access a text file
folder structure
project
-app
-home
files.html
-uploads
-akp.txt
I am trying in access abc.txt from files.html
files.html
<ng-include src="'../uploads/akp.txt'"></...
0
votes
1
answer
119
views
css not working in child theme when using ng-include
I'm using AdminLTE template to create a simple web app. I'm traing to use AngularJS for my front end. I want to split my theme in some child themes because it's easier to mantein. To do this, i use "...
1
vote
0
answers
213
views
AngularJS passing scope through ng-include to x-kendo-template
I have created a custom template for my Kendo-ui multi-select element.
HTML:
<select kendo-multi-select k-options="vm.selectOptions" k-data-value-field="'id'" k-data-text-field="'name'" k-value-...
0
votes
2
answers
2k
views
AngularJs - ng-class not working
I'm new to Angular and still learning. I've created 'header.html' file and include it in my other html files using 'ng-include'. inside my 'header.html', I have a nav bar and I want nav bar links ...
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">
...
-1
votes
1
answer
254
views
Change ng-include with controller
I have a tab structure made of ng-reapet which shows the content of each tab in a panel (the same one but diff content). I have added
<div ng-controller="myCtrl">
<div ng-include="'tpl....
0
votes
1
answer
60
views
How to reload ng-include after route change in angularjs
I have a sidebar which I hide on the login page, but show on other pages.
The content of the sidebar depends on the user logged in. After the user logs in I want to refresh the sidebar which is ...
1
vote
1
answer
646
views
ng-include for sidemenu in ionic 3.20.0
I've been trying to figure out how to re-use items in different pages without copy and pasting them. I thought I'd start with something easy and make the header menu a separate file that I ng-include. ...
0
votes
2
answers
375
views
using different themes for each user type in a single angularJs app
I m developing angularJs single page app. Currently my app have four kind of user (guest, student, Instructor, admin). I want to shown different dashboard for each user role mean i want to show ...
0
votes
0
answers
378
views
ng-include gives err_content_decoding_failed
I have a simple ng-include that shows some html code. But in chrome, quite often I get the following error:
GET https://example.com/view.html net::ERR_CONTENT_DECODING_FAILED
I tried turning gzip ...
1
vote
2
answers
206
views
validate one ng-include inside a form
How can I validate one ng-include at a time,
<form name="myform" ng-submit="validateData()" novalidate="novalidate">
<div>
<div ng-include="customtemplate"></div>
...
0
votes
2
answers
77
views
How to load data using dynamic ng-include with AngularJS with correct controller for each page?
I realize that this isn't an entirely new question, but after days of trying to get this to work I seem to not understand something fundamentally, despite the extensive searches I have done as I ...
0
votes
1
answer
75
views
when use ng-include add javascript controller not work
I know I could do load all controller in mainPage but when there are many
innerController and they have nothing to do with each other. Perhaps
it's not a good idea to move them all to ...
1
vote
2
answers
50
views
modify main controller $scope from ng-include controller
I have a header view with his controller included in my page with:
<div ng-include="'header.html'" ></div>
the header includes an action call like save, update... I want when the user ...
1
vote
1
answer
106
views
including html template, ng-include doesn't work
I'm working on a personal project using angularJS. I downloaded this html template online and when i tested the template it is working perfectly. The problem is that when i try to include a page from ...
4
votes
1
answer
3k
views
Angular: How to implement ng-include like functionality in Angular 5?
Is there any functionality to render html file dynamically inside a components template based on the path? I have the path to local html file now I need to display the content of it inside a ...
1
vote
0
answers
100
views
Angular html5Mode + ng-include break navigation
I am trying to use angular with $locationProvider.html5Mode enabled and it works fine except when I use ng-include somewhere in the page.
angular
.module('AngularApp')
.config(function($...
1
vote
1
answer
947
views
Including html files using ngInclude
I'm trying to include an html file in to another html using ng-include. Followed this with no luck, maybe due to webpack version differences.
404 errors trying to find the file in the ng-include
...
2
votes
1
answer
2k
views
angularJs : ng-template inside ng-include
I have lot of small template, so i put them in a single html file.
smallTemlates.html
<script type="text/ng-template" id="template1.html">
...
</script>
<script type="text/ng-template"...
0
votes
1
answer
40
views
How to perform concatination in a template in angular js
I have a template which I need to show the path of a template dynamically.
<div data-ng-include="'app/templates/'templateUrl'.html'"></div>
$scope.templateUrl = "text";
But the link is ...
-1
votes
1
answer
523
views
Display a JSP page from a URL in a modal popup in AngularJS
I am trying to load a JSP page inside a modal in AngularJS.
The JSP page have lot of scripts and so I wont be able to take the source and create a separate template. The URL is from a different ...
3
votes
1
answer
1k
views
$parent not working in ng-include angular [duplicate]
I am changing value of variable inside child controller using $scope.$parent but change is not reflecting to its parent.
<div data-ng-if="!addBillDetails">
<button class="btn btn-small" ...
1
vote
3
answers
328
views
AngularJS: many times use ng-include
I have old project. In this moment i can not rewrite all to use ng-view and routes. So i have large html file and many unreadable code.
<div ng-if="f1">
<div>...</div>
</div&...
0
votes
1
answer
1k
views
AngularJS: Load page on link click
I got 2 divs, first has links pointing to individual pages and another one to display the content of pages the links are pointing to. Here is how it looks:
<div id="navigation">
<a href="...
0
votes
0
answers
126
views
Angular 1.6 ui-router and ng-include in Internet Explorer
I am developing an Angular 1.6 app and using Angular UI-Router.
In my config.router.js file I have a state:
$stateProvider.state('myapp.edit', {
url: '/edit/:id',
...
0
votes
2
answers
246
views
Angular HTTP Requests to Render Different HTML
So I have a rest endpoint at the URL /check which returns serialized user data like so:
{
'username' : 'malikb',
'email': '[email protected]',
'first_name': 'Malik',
'usertype': 'C'
}
I'...
0
votes
1
answer
644
views
section with ng-include hide and show
I have an ng-include directive inside a section which needs to conditionally hide the data being shown from ng-include url. If i hide section, I never get the ng-include data but if i start with ...
1
vote
0
answers
784
views
Using ng-include with controller as syntax
I need to change the "controller as" name to ctrl in "_restaurantdiv.html" since I am using this partial file in different places under different controllers. Currently I am doing so by writing ng-...
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....
0
votes
1
answer
1k
views
template not loading using ng-include
I learned about ng-include and used it for templates but I am not able to include the page.
The index.html and menu.html are in the same directory and menu.html is to be loaded in index.html
<ng-...
3
votes
0
answers
9k
views
How to use ng-include with Angular 2/4
I tried to include a html component in an other but I don't know how to resolve it by using ngInclude in angular 2/4...
my html component
<form class="form-horizontal">
<div ng-include=...
0
votes
1
answer
1k
views
Angular 1 how to properly include external component inside ng-include?
Situation: I have a view where I'm including a fragment with ng-include. The fragment loads perfectly and works as expected when inside view where controller is defined.
My problem is, that when I ...
1
vote
0
answers
254
views
AngularJS bindings not working when in a template being ng-included
While creating a dynamic panel:
<div ng-controller="widgetCtrl">
<div drag-group="widgets">
<div class="panel panel-primary" ng-repeat="widget in widgets" draggable-widget="...
0
votes
1
answer
100
views
How get FlexGrid control inside a ng-include file?
I'm building a SPA with Angularjs and Wijmo 5.
I've inserted a Wijmo FlexGrid inside a partial file, then I've included it to the parent page using ng-include. The parent page is also an partial file:...
1
vote
2
answers
864
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="...
1
vote
1
answer
2k
views
Adding partial views and controller in angular app
I am in the process of optimizing the performance of Angular app. I am using ng-include to add partial views and its controllers. Following is the code snippet
<!--show term rule view-->
<...