2016-02-22 80 views
0

我跟着這個教程: https://www.npmjs.com/package/gulp-angular-templatecache使用一飲而盡,角templatecache離子

我不知道在哪裏把這個在我的項目。 在這一點..

angular.module("templates").run([$templateCache, 
function($templateCache) { 
    $templateCache.put("template1.html", 
    // template1.html content (escaped) 
); 
    $templateCache.put("template2.html", 
    // template2.html content (escaped) 
); 
    // etc. 
} 
]); 

如語法,我不知道哪一部分應該去,我想按照這個教程明智

這是我的文件app.js

angular.module('myapp', ['ionic', 'myapp.controllers', 'myapp.services']) 

.run(function($ionicPlatform) { 
. 
. 

我有一個問題,這樣做我所有的模板被修改?因爲這是我需要的。謝謝。

回答

2

在這篇文章是你看,我做了我的項目之一。

Gulp Deploy