GithubHelp home page GithubHelp logo

Comments (6)

joni2back avatar joni2back commented on May 21, 2024

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!

from angular-filemanager.

vikaskuppili1 avatar vikaskuppili1 commented on May 21, 2024

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

from angular-filemanager.

joni2back avatar joni2back commented on May 21, 2024

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

from angular-filemanager.

joni2back avatar joni2back commented on May 21, 2024

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

from angular-filemanager.

vikaskuppili1 avatar vikaskuppili1 commented on May 21, 2024

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

from angular-filemanager.

vikaskuppili1 avatar vikaskuppili1 commented on May 21, 2024

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

from angular-filemanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.