gulp-angular-templatecache - Concatenates and registers AngularJS templates in the $templateCache.
1
vote
0answers
5 views
angular template cache doesn't work when template key contains file extension
Template cache fails for me for some reason, when I do this:
angular.module('myApp').run([
'$templateCache', function ($templateCache) {
$templateCache.put('test.html', 'content');
}
]...
0
votes
1answer
36 views
Angularjs template 404 not found
Using angularjs routing, sometimes I get
template/home.html Failed to load resource:
the server responded with a status of 404 (Not Found)
But I declared template/home.html ...
0
votes
0answers
31 views
What are the possible reasons for $templateCache to not work?
I am using grunt ngtemplates as part of my build task. It is producing a logically correct templateCache.js file. This file then concats with other scripts to give a concat/scripts/scripts.js file ...
1
vote
0answers
57 views
Using $templateCache with template vs templateUrl
I am using grunts ng-template to store the html templates in the $templateCache.
The angular docs suggests that I can use the template like this:
myApp.component('myComponent', {
templateUrl: '...
0
votes
0answers
41 views
templateCache in AngularJs 1
I want to display two different templates with ngInclude (something like a tab-change). So, given the current scenario:
HTML
<div ng-app='app' ng-controller='Main'>
<ul>
<li ...
0
votes
0answers
35 views
$scope being cached on page in only one method
When this page loads the $scope in each of the methods below contains the same id value. The self.gridData is populated as it should be and accessible in the selectAllClicked method.
When I navigate ...
0
votes
1answer
45 views
How do I load an Image from $templateCache using Angular 1
I have a plnkr and the story is long but it comes down to I need to be able to use an image from the templateCache. I try to do this using ng-src like this...
$templateCache.put('img/help/copy_icon', ...
0
votes
1answer
59 views
How to put content of $templateCache.put(…) into html file instead of embedding Html into Javascript?
Embedding HTML in JavaScript like the following code snippet is not maintainable when you have one file app.js and many modules.
app.js
app.config(['$routeProvider', function($routeProvider){
$...
0
votes
0answers
18 views
grunt-angular-templates like plugin for Gradle
Is there a plugin that can concatenate & register AngularJS templates in the $templateCache and append it to a js file like grunt-angular-templates.
I looked at https://github.com/craigburke/...
0
votes
0answers
15 views
Partials reload despite working gulp-angular-templatecache task
I'm trying to get my dashboard ng-includes to load more quickly, but each time I navigate from the dashboard state to a different state, then back, the dashboard templates all reload again.You can see ...
1
vote
1answer
110 views
how to access controller in directive [jasmine]
I am having some difficulty accessing the methods and variables on a directive in order to test it. What am I doing wrong? I have attached my directive and the test file. I did not include my karma ...
0
votes
0answers
5 views
reuseable template in angular js
In my angular js application I have a have page where I have many html partial pages. That loads on demand on clicking on the tab. Some of these partial page are further injected by another partial ...
0
votes
1answer
107 views
Angular $templateCache 404 error for relative templateUrls after bundling
I am using Grails 3 with the AngularJS profile together with the Angular Toastr plugin.
When I run the application in development mode, everything works perfectly but when I bundle the app (without ...
0
votes
0answers
40 views
AngularJS $templateCache under MVC
I couldn't find any documentation or article on this.
We here at the company I work for have MVC project.
And we build Angular SPA on top of it.
Also we want it to work offline.
So, I need cache. ...
0
votes
0answers
52 views
Using angular's templateCache in case of large apps
I am working on optimizing a pretty large angularjs application with 100+ templates. I use grunt for automation. What i am trying to achieve here is that i need to prefix all the urls in my production ...
0
votes
0answers
42 views
How to implement AngularJS $templateCache in MVC application?
I have read some articles on using $templateCache service of AngularJS.
But I cant figure out how to use it when our Angular code runs inside MVC app.
The idea is - when the landing page (Home/Index) ...
2
votes
0answers
38 views
AngularJS inside MVC, preloading static HTML or MVC partial views to use @templateCache to make app offline?
We have an MVC project with AngularJS sitting on top of it.
Question - is possible to preload static HTML files (partial templates) into templateUrl property for Angular's custom components or ...
0
votes
1answer
38 views
Using $templateCache with ui-router and uglify in angular 1.x
Sharing this as a Qusstion-answer post.
What to do when you have to use $templateCache in templateProvider of a route in ui-router and have to utility the code? Injecting does not work, and angular ...
2
votes
1answer
48 views
Override $templateCache to be case insensitive
Can one override core provider like $templateCache while maintaining reference to the original provider ?
I'd like to override $templateCache to be case insensitive.
I.E. something like
var ...
2
votes
1answer
101 views
gulp-angular-templatecache fails to find the the template file it creates
We are developing a web application using AngularJS and ASP.NET Web API. There is a dev machine set up with GoCD that deploys the app after every commit to dev branch in our github repo. We are using ...
0
votes
1answer
101 views
$templateCache not working in angular-config in Angular.js
I am getting "angular.min.js:6Uncaught Error: [$injector:modulerr]" when trying to use $templateCache in my app.config block, if i remove the $templateCache parameter from app.config then i do not see ...
0
votes
2answers
78 views
UI Router controller not working when view is pulled in with $templateCache?
I am using gulp-angular-templatecache to convert all of my filename.view.html files into a templates.js file.
I'm then using $stateProvider to create my states and pull in the templates using $...
0
votes
0answers
82 views
i want to disable templateCache functionality in gulp
I am using gulp for one of my angular project. I want to know how can i disable the templateCache thing in gulp. I tried commenting some code in build.js but that didn't work. here is the code in ...
0
votes
1answer
77 views
Ionic template cache doesn't work on device, only in browser
I implemented gulp-angular-templatecache-ionic to my Ionic app, which made my application run significantly faster in my desktop chrome browser, but when I build and deploy (ionic run android) this ...
0
votes
1answer
115 views
mix.ngTemplates is not a function()
I followed the short tutorial to install an html template cache package in my application: laravel-elixir-ng-templates I installed and configured it exactly as show but now when I try to run gulp I ...
1
vote
0answers
21 views
angular-meteor $templatCache not working
I'm using angular-meteor.
When i try load templates via angular $templateCache.get service i get 404/undefined.
AFAIK, when meteor runs he loads all html files into the $templateCache. I can't see ...
0
votes
1answer
434 views
Angular js load template into templateCache using template url
I'm trying to load a template into $templateCache in the module's run block as follows.
angular.module('myapp').run(function($http, $templateCache, $timeout) {
var templateLocation = 'location/to/...
0
votes
0answers
114 views
gulp-angular-templatecache wrong module name
I'm having serious problems getting gulp-angular-templatecache to work nicely within my app. I'm using the HotTowel yeomen generator and I modified it a little bit, but I can't seem to get my template ...
0
votes
1answer
283 views
Gulp changed ionic.app.css in ionic serve
I work with ionic framework and for better performance I add angular templatecache, sass and generate using gulp. In Action this worked for me But when I serve ionic gulp generate/changed original ...
0
votes
0answers
35 views
gulp-angular-templatecache does not split the url
In a gulp-angular-templatecache related gulp task, I am trying to change the url of processed template into only the filename.html (instead of a url path like app\shared-templates\filename.html) I ...
0
votes
0answers
114 views
Template URL is wrong for the templateCache in Angularjs using gulp
The template URL loaded after the Gulp build is wrong. i expect the template URL should be $templateCache.put('scripts/app/cinemasList/cinemasList.html') but the actual is $templateCache.put('scripts/...
0
votes
0answers
39 views
How to format the second parameter of $templateCache.put()
I use $templateCache.put to load my html partials into templateCache. And I use gulp to do this job automatically. But when the job is done, I check the .js file gulp created for me, I see this
$...
4
votes
3answers
1k views
angularJS $stateProvider : How to unit test different views in UI-Router?
How can I unit test different views for the below scenario
.state('app.sr.product.upload', {
name: 'upload',
url: '/upload',
data: {
tags: [],
...
0
votes
2answers
73 views
Where should I use $templateCache?
I want to use $templateCache service to add some html into the cache. In Angular documentation example, it only shows the case of using it in run:
var myApp = angular.module('myApp', []);
myApp.run(...
0
votes
1answer
805 views
Using gulp-angular-templatecache in ionic
I followed this tutorial:
https://www.npmjs.com/package/gulp-angular-templatecache
I do not know where to put this in my project.
in this point..
angular.module("templates").run([$templateCache,
...
2
votes
1answer
4k views
Can't bind to 'ngforOf' since it isn't a known native property [duplicate]
Can't bind to 'ngforOf' since it isn't a known native property
<h4>Colors bad boys</h4>
<ul><li [ERROR ->]*ngfor="#color of colors">
<span>{{color....
2
votes
1answer
57 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....
1
vote
1answer
209 views
Angular $templateCache and $stateProvider fix for native ios phonegap/cordova
Angular $templateCache, $stateProvider and ng-include works beautifully in a web browser, but on native ios using phonegap/cordova it won't load templates or go to states
I've gone through the ...
0
votes
2answers
262 views
How use file for $template cache?
I need use template from html file.
So I added script where the id is path to my html file.
<script type="text/ng-template" id="app/directives/userAvatarTooltip.html"><script>
and get ...
0
votes
1answer
94 views
Angular main module depends on $templateCache.run() (submodule)
I'm trying to use $templateCache and have the following code:
All my templates are compiled in a templates.js:
angular.module("gm.templates", []).run(["$templateCache", function($templateCache) {$...
0
votes
0answers
150 views
<script> template does not get initialized with ng-init
New to angularjs and templates. I wish to create a tooltip that has two options to download a file(as zip and csv). Cannot get the functionality to work.
Html looks as follows.
<script type="text/...
1
vote
0answers
68 views
How can I search the full contents of Angular's $templateCache with my factory service?
I want to be able to search against all the templates I have loaded in the $templateCache. So far, I can only do one at a time with
$templateCache.get('testArticles/articles/article01.html')
but I ...
0
votes
1answer
336 views
$templateCache from file undefined? When is the accessible by other js code? (with np-autocomplete)
I'm rather new to angular and I'm trying to integrate np-autocomplete in my application (https://github.com/ng-pros/np-autocomplete). However I can only get it to work when I'm passing a html string ...
0
votes
0answers
42 views
Angular: Dynamically replace data bindings in template
I need to replace special keys in template which I download manually in angular before compiling and inserting into the DOM. Probably angular should have internally such functionallity, so I don't ...
0
votes
2answers
54 views
1 $templateCache, 2 modules
In an angular app, I have a module that I want to use within another.
module A defines listController and the list.html file that goes along with that controller
All html files are put into $...
0
votes
1answer
595 views
why $templateCache.removeAll() not working?
I am using $templateCache.removeAll(); to remove cache on LogOut, it is working fine since when I tried $templateCache.get("abc.html") it returns undefined.
But when I again load angular app abc.html ...
0
votes
2answers
224 views
How to bypass template cache in angularjs?
When I made changes in any template (html) in my code and refresh from browser then the changes does not occur in application.
I want to bypass template cache when I made changes in any template i.e ...
2
votes
3answers
998 views
How can I utilise my templateCache module in my Jasmine tests?
I do NOT want to use karma-ng-html2js-preprocessor or $httpBackend. I have a templateCache module which I created dynamically.
app.js
angular.module('myApp', ['ngRoute', 'ui.bootstrap', 'ui.router', ...
0
votes
0answers
43 views
how to read values from templatecache?
I have generated a minified angular app with grunt. In the site I get an error:
Cannot GET /views/tabs.html
However when I look in the minified script.js I can see:
angular.module("app").run(["$...
0
votes
2answers
331 views
Change templateURL of directive dynamically after $http.get()
I'm working on 'skeleton' loading the UI in different components. I have a directive that I'm loading a template initially (this template has low opacity and looks like a mock table). Once I get the ...