Questions tagged [angularjs-ng-include]

Fetches, compiles and includes an external HTML fragment.

Fetches, compiles and includes an external HTML fragment.

Usage

As element: (This directive can be used as custom element, but be aware of IE restrictions).

<ng-include
  src=""
  [onload=""]
  [autoscroll=""]>
...
</ng-include>

As attribute:

<ANY
  ng-include=""
  [onload=""]
  [autoscroll=""]>
...
</ANY>

As CSS class:

<ANY class="ng-include: ; [onload: ;] [autoscroll: ;]"> ... </ANY>

Reference:
https://docs.angularjs.org/api/ng/directive/ngInclude

469 questions
0
votes
1 answer

Poedit translations are not translated when using angular ng-include

I want to have my text translated and I am using poedit to translate my text. I am working in ZF2. I do have my translation file (created with poedit) in place. And that is working. For example: in this view example the "Sign in" is translated. (1)…
ProX
  • 297
  • 1
  • 3
  • 16
0
votes
1 answer

grunt build gives Lexer Error, breaks app ng-include

When I deploy my unminified code everything works great. Then I run grunt build and deploy from the dist folder, as you do. When I check out one of the pages though it breaks and I get an error in the console: Error: [$parse:lexerr] Lexer Error:…
Connor Leech
  • 18,052
  • 30
  • 105
  • 150
0
votes
1 answer

filters injected using ng:include not being applied on table

I have a movielist being rendered on my page for which my controller code looks like this angular.module('rentalapp.controllers.rentals', ['restangular']) .controller('rentalController', ['$rootScope','$scope', 'DataService', function($rootScope,…
user2031428
  • 1,039
  • 2
  • 9
  • 13
0
votes
3 answers

How can I pass a variable into an ng-include?

I have the following code:
then in itemG.html I have: How can I get my ng-repeat to print out all of the images?
Grammin
  • 11,808
  • 22
  • 80
  • 138
0
votes
1 answer

Use Js imported by index.html using ng-include

I use ng-include to import sidebar and navbar in my webapp something like this You are using an outdated browser. Please upgrade your browser to improve your experience.

Silvio Troia
  • 1,439
  • 19
  • 36
0
votes
2 answers

Does anybody know how to make an anchorScroll inside ng-repeat?

I need to know how to make an anchorScroll to differents ID inside a ng-repeat menu.
  • {{ page.title }}
  • One
    Two
    Thanks!
    0
    votes
    1 answer

    Require directive on template

    I am using RequireJS in my Angular app. I would like to require my pill where it is actualy used. pill.js define([], function() { angular.module('app').directive('pill', function() { return function(a,b,c) { b.html("A…
    0
    votes
    1 answer

    Can I append a string with the ng-include URL?

    Can I do something like this :
    -- Requirement is to append a constant string with the template URL.
    Manish
    • 99
    • 1
    • 8
    0
    votes
    2 answers

    angularjs - Point ng-include to a partial that contains a script directive

    This is an edit of the original question: When using the ng-include directive to reuse my header HTML on all pages, there is a slight delay in loading/rendering the top navbar. To alleviate the problem, I'm attempting to point ng-include to a…
    billyw
    • 388
    • 1
    • 5
    • 15
    0
    votes
    2 answers

    AngularJS directive loaded dynamically in ng-include do not work

    I have a custom directive which adds some html. myAppModule.directive('myDirective', function() { var linker = function(scope, element) { return element.html("directive loaded"); }; return { restrict: "E", …
    oliholz
    • 7,447
    • 2
    • 43
    • 82
    0
    votes
    0 answers

    angular directive: infinite nesting using ng-include, model update does mess up view

    I just found out, that when using the infinite structure in a directive on every model update, the template will get messed up on too many ng-changes. This is caused by the ng-include (I figured out). I use somekind of this in my directive's…
    sp33c
    • 494
    • 1
    • 5
    • 15
    0
    votes
    1 answer

    ngInclude not inserting properly fetched DOM

    EDIT: It was a short-lived bug with ng-include inside ng-repeat. I never updated my angular dependency. Solution Found here : https://groups.google.com/forum/#!topic/angular/JjmnPQl-SWg This is a very difficult problem, because I can't even…
    0
    votes
    1 answer

    ng-include causes url to change from localhost/index.html to localhost/index.html#/index.html

    I am using angularjs and it automatically appends #index.html to url http://localhost/index.html so the path will look like http://localhost/index.html#/index.html when i commented the ng-include wrapped
    c2h5oh
    • 227
    • 5
    • 9
    0
    votes
    1 answer

    Calling a scope function from an ng-include template passing template value as parameter

    So my problem is kind of self explanatory, I want to pass a parameter which I get from the angular template engine as a parameter. Something like:
    click me
    the problem is that any other numeric value…
    0
    votes
    1 answer

    ui-tinymce inside a ng-include partial

    I am adding tinymce inside a partial using ng-include. This is not working. When I move the same syntax to the view file, it is loading properly. Any suggestion, how can I add tinymce inside a partial?