joni2back / angular-filemanager

JavaScript File Manager Material Design Folder Explorer Navigator Browser Manager in AngularJS with CSS3 Responsive (with FTP in PHP / Java / Node)
https://joni2back.github.io/angular-filemanager/
MIT License
1.76k stars 578 forks source link

/assets/templates/index.html Not found #35

Closed VikasKuppili7 closed 9 years ago

VikasKuppili7 commented 9 years ago

hello jonas ,first of i thank you for u r contribution , i am using this on flask framework . so i need keep separate source file in the static folder and html in templates folder upon doing so , i have changed the source file locations and change the location according my source location structure . event though i have changed all soruce locations it is giving the error /assets/templates/index.html Not found

i have checked all of the file which are included .

thanks in advance

joni2back commented 9 years ago

Hi @vikaskuppili1 first of all, the templates are compiled in dist/cached-templates.js with gulp build command.

In the html code, you should view template inclusion like <div ng-include="'assets/templates/navbar.html'"></div> using assets/templates as template folder...

So... if you are going to use other template path you must redefine this new path in these html files... Then, you must specify this path in the gulpfile.js to make a new template compilation, so... the code will turn to this:

gulp.task('cache-templates', function () {
  return gulp.src('MY/NEW/FOLDER/OF/TEMPLATES/*.html')
    .pipe(templateCache('cached-templates.js', {
      module: 'FileManagerApp',
      base: function(file) {
        return 'MY/NEW/FOLDER/OF/TEMPLATES' + path.basename(file.history);
      }
    }))
    .pipe(gulp.dest(dst));
});

Then you just must run gulp build command.

PD: Don't forget to give a star :star:

Regards!

VikasKuppili7 commented 9 years ago

Thank you Very much for u r info i been hitting my head to wall for 4 hours for this .

and also should i must have to use the gulp for using this or is it not necessary . and one more thing is that i hadnt included gulp file in my working project just taken required components then howcome it loaded the gulp file

please do ignore if i annoy u asking silly question , and once again thank you very much

joni2back commented 9 years ago

Hey @vikaskuppili1 I made changes in the app, now you only need to define your template directory at config.js

 tplPath: 'MY/NEW/PATH'

And in gulpfile.js

var tplPath = 'MY/NEW/PATH' //must be same as fileManagerConfig.tplPath

Then run gulp build

joni2back commented 9 years ago

If you dont want to use gulp, you should do the following over the index.html main file

  <!-- Uncomment if you need to use raw source code
    <script src="assets/js/app.js"></script>
    <script src="assets/js/config.js"></script>
    <script src="assets/js/chmod.js"></script>
    <script src="assets/js/item.js"></script>
    <script src="assets/js/filenavigator.js"></script>
    <script src="assets/js/fileuploader.js"></script>
    <script src="assets/js/translations.js"></script>
    <script src="assets/js/controller.js"></script>
    <script src="assets/js/selector-controller.js"></script>
  -->

  <script src="dist/angular-filemanager.min.js"></script><!-- Comment if you need to use raw source code -->
  <script src="dist/cached-templates.js"></script><!-- Comment if you need to use raw source code -->
VikasKuppili7 commented 9 years ago

hii jonas i have followed it . it is raisng another error

GET http://127.0.0.1:5000/assets/templates/navbar.html 404 (NOT FOUND)b @ angular.min.js:87m @ angular.min.js:83$get.f @ angular.min.js:80(anonymous function) @ angular.min.js:112$get.l.$eval @ angular.min.js:126$get.l.$digest @ angular.min.js:123$get.l.$apply @ angular.min.js:126l @ angular.min.js:81O @ angular.min.js:86w.onload @ angular.min.js:87 angular.min.js:87 GET http://127.0.0.1:5000/assets/templates/sidebar.html 404 (NOT FOUND)b @ angular.min.js:87m @ angular.min.js:83$get.f @ angular.min.js:80(anonymous function) @ angular.min.js:112$get.l.$eval @ angular.min.js:126$get.l.$digest @ angular.min.js:123$get.l.$apply @ angular.min.js:126l @ angular.min.js:81O @ angular.min.js:86w.onload @ angular.min.js:87 angular.min.js:87 GET http://127.0.0.1:5000/assets/templates/current-folder-breadcrumb.html 404 (NOT FOUND)b @ angular.min.js:87m @ angular.min.js:83$get.f @ angular.min.js:80(anonymous function) @ angular.min.js:112$get.l.$eval @ angular.min.js:126$get.l.$digest @ angular.min.js:123$get.l.$apply @ angular.min.js:126l @ angular.min.js:81O @ angular.min.js:86w.onload @ angular.min.js:87 angular.min.js:87 GET http://127.0.0.1:5000/assets/templates/main-table.html 404 (NOT FOUND)b @ angular.min.js:87m @ angular.min.js:83$get.f @ angular.min.js:80(anonymous function) @ angular.min.js:112$get.l.$eval @ angular.min.js:126$get.l.$digest @ angular.min.js:123$get.l.$apply @ angular.min.js:126l @ angular.min.js:81O @ angular.min.js:86w.onload @ angular.min.js:87 angular.min.js:87 GET http://127.0.0.1:5000/assets/templates/modals.html 404 (NOT FOUND)b @ angular.min.js:87m @ angular.min.js:83$get.f @ angular.min.js:80(anonymous function) @ angular.min.js:112$get.l.$eval @ angular.min.js:126$get.l.$digest @ angular.min.js:123$get.l.$apply @ angular.min.js:126l @ angular.min.js:81O @ angular.min.js:86w.onload @ angular.min.js:87 angular.min.js:87 GET http://127.0.0.1:5000/assets/templates/item-context-menu.html 404 (NOT FOUND) \

it might be due to u havent assigned the tplPath to every one of the html

VikasKuppili7 commented 9 years ago

go the solution jonas ,when ever ui uses

these are becoming cached so clean the caches history is the solution