You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
712 B

  1. 'use strict';
  2. angular.module('app.profile', ['ngRoute'])
  3. .config(['$routeProvider', function($routeProvider) {
  4. $routeProvider.when('/profile', {
  5. templateUrl: 'views/profile/profile.html',
  6. controller: 'ProfileCtrl'
  7. });
  8. }])
  9. .controller('ProfileCtrl', function($scope, $rootScope, $http) {
  10. $http.get(clienturl + 'user')
  11. .then(function(data) {
  12. console.log('data success');
  13. console.log(data);
  14. $scope.user = data.data;
  15. localStorage.setItem("ai_user", JSON.stringify($scope.user));
  16. }, function(data) {
  17. console.log('no user');
  18. });
  19. });