I am doing grunt serve:dist and inside I am grunt-contrib-requirejs a all.js based on my RequireJS main.js file which has require.config and require .
I think that all.js should be in my distribution, the file that I should include at startup in my index.html, because everything is there. Is it correct?
<script src="require.js" data-main="all.js"></script>
I also create a JavaScript template file with ngTemplates and a boot file based on all the HTML template files, so a template file called templates.js looks like this:
define([ 'angular' ], function(angular) { angular.module('MyApp.templates', []).run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('templates/MyTest.html', "<h1>Title</h1>\r" +
So, I have a $templateCache that I want to use. But I do not understand how this can be done. I think I need to load templates.js because it is not included in all.js and therefore I have to somehow insert it.
source share