jquery - How to check the length of the directory in javascript -


i have 2 different directories like

  • dir 1 --> template 1 --> tpl1.html
  • dir 2 --> template 1 --> tpl1.html

my requirement dir 1 has js files, css files, icons etc.. dir 2 have html file same name dir 1 html files.

based on different domains on page load need make decision html needs load.

i using require js "text", want make path of text!path more dynamic.

inside directory2 want check length first, , want pick file.

please suggest me approach on this.

i'm not sure if mean "check length of directory", use split().

var directory = 'dir0/dir1/dir2'; var directories = directory.split('/'); var count = directories.length; 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -