Search the Community
Showing results for tags 'angularjs'.
-
Hi all, I'm experimenting building a content site based on AngularJS and Processwire. I‘ve turned on the html5Mode in angularjs, everything works so far re agularjs routing, but when I try to refresh a page, only loads a page without header (thus no js/style). This to me seems a classic problem with server setup ( http://stackoverflow.com/questions/16569841/reloading-the-page-gives-wrong-get-request-with-angularjs-html5-mode/16570533#16570533 ), which requires htaccess setup (I'm on Apache server). But not quite sure how to set up the htaccess? Attached is my htaccess, with below are some routing settings of angular: scotchApp.config(function($routeProvider,$locationProvider) { $routeProvider .when('/news', { templateUrl : 'news', controller : 'mainController' }) .when('/about', { templateUrl : 'about', controller : 'aboutController' }) .otherwise({ templateUrl : 'news', controller : 'mainController' }); $locationProvider.html5Mode(true); }); THANKS advance for all your help! htaccess.txt
-
Hi, I'm working on a simple Ionic app which is going to use ProcessWire as the backend. This app allows people to upload images and then like/comment on them. It's a lot like a stripped down imgur app. I've set up some basic services such as register, login & reset password. There are a couple of things I am doubtful about. 1. How do I get user's unique session Id once he's successfully authenticated through AngularJS's http post request? I'm currently using following code: $sessions = $session->getAll(); $session_id = $session->_user["fingerprint"]; But I'm not sure if that's the right way to do it. I'm not even sure if that's the session id. I know there's something called SessionCSRF["name"], I tried that. I'm sending session_id as response to http post request. Then I'm using that session id to check if user is authenticated for his/her further actions such as commenting/liking/posting etc. 2. Now that I've got the session id, how do I identify the user based on the given session id? or should I send user ID back to PW everytime user is performing any action? Is it possible to identify user just based on the session fingerprint that I'm giving back to the app? Among other things I'm considering are keeping a device id on the server for each user, so as to gain better control over user's sessions. I can log out all the devices linked at once etc. I'd really love to hear from you guys how you'd plan to do this app. I'm experienced with PW but not very much with AngularJS. Thank you.
-
Hi all, Starting up a web app and planning to use PW and AngularJS together for the first time. However, I'm having trouble getting Angular's routing to work. It seems that PW's rewrites are taking precedence so whenever I navigate to a URL that's defined in an Angular route, PW throws a 404 error. Has anyone successfully setup Angular's routing with ProcessWire? Would love to learn how it's done. Thanks!