Angular 1.5.*

I am only using ng-view, not ng-include.

I can't get angular to look in my templatecache file for templates. Instead *it 
makes a http request for the html file when I click on the respected route.*

Should  $templateCache.put(); cause ng-view to use templateCache for it's 
html files?

  angular
  .module('gulpNewy', ['ngRoute', 'gulpTemplates'])
  .config(function($routeProvider) {
      $routeProvider
          .when('/home', {
              templateUrl: 'views/home.html',
              controller: 'homeCtrl'
          })
          .when('/examples', {
              templateUrl: 'views/examples.html'
          })
          .when('/screen-shots', {
              templateUrl: 'views/screen-shots.html'
          })
      $routeProvider.otherwise({ redirectTo: '/home'});
  })
  
  angular.module('gulpNewy').run(["$templateCache", function($templateCache) 
{
    $templateCache.put('examples.html');
  }]);



-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to