Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vikaskuppili1 opened this issue Jul 3, 2015 · 6 comments
Closed

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

vikaskuppili1 opened this issue Jul 3, 2015 · 6 comments

Comments

@vikaskuppili1
Copy link

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
Copy link
Owner

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 ⭐

Regards!

@vikaskuppili1
Copy link
Author

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
Copy link
Owner

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
Copy link
Owner

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 -->

@vikaskuppili1
Copy link
Author

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

@vikaskuppili1
Copy link
Author

go the solution jonas ,when ever ui uses

<script src="dist/angular-filemanager.min.js"></script> <script src="dist/cached-templates.js"></script>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants