Hi everybody. I have done an example for subdirectories and files in given
path. i have written backend in python.
here is the server response
{"msg": {"ui": [{"path": "/usr/share/nginx/www/framework/ui/templatejson.html",
"file": "templatejson.html"},
{"path": "/usr/share/nginx/www/framework/ui/users.html",
"file": "users.html"},
{"path": "/usr/share/nginx/www/framework/ui/confirmation.html",
"file": "confirmation.html"},
{"path": "/usr/share/nginx/www/framework/ui/elfinder.html",
"file": "elfinder.html"},
{"path": "/usr/share/nginx/www/framework/ui/test.html", "file":
"test.html"},
{"path": "/usr/share/nginx/www/framework/ui/js", "folder":
"js"},
{"path": "/usr/share/nginx/www/framework/ui/font", "folder":
"font"},
{"path": "/usr/share/nginx/www/framework/ui/attribute.html",
"file": "attribute.html"},
{"path": "/usr/share/nginx/www/framework/ui/app", "folder":
"app"},
{"path": "/usr/share/nginx/www/framework/ui/upload.html",
"file": "upload.html"},
{"path": "/usr/share/nginx/www/framework/ui/amprsnd.html",
"file": "amprsnd.html"},
{"path": "/usr/share/nginx/www/framework/ui/datepicker.html",
"file": "datepicker.html"}
]}}
here is mycode in template
<div data-ng-repeat="(k,val) in data">
<p>Directories & Files in <strong>{{k}}</strong></p>
<div data-ng-repeat="value in val">
<div data-ng-repeat="(key,v) in value ">
<sapn ng-switch on="key">
<span ng-switch-when="folder">
<img src="/app/img/folder-closed.png"
data-ng-click="getDir(value.path)"/>{{v}}
</span>
<span ng-switch-when="file">
<img src="/app/img/file.png" />{{v}}
</span>
</sapn>
</div>
</div>
</div>
<button data-ng-disabled="disabled" data-ng-click="getData()"><i
class="icon-arrow-left" title="Back"></i></button>
here for folder im giving another function so it ll gve the response related
to path subdirectories and files.
but my problem is when i click on Back botton i have to gve previous path
but this back botton is out of scope so i was unable to take the current path
of folder,
if i give in scope means it ll repeat for each item.please any one help me.
Thank U
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.