Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. app.config(['$routeProvider', function ($routeProvider) {
  2. $routeProvider
  3. .when('/', {
  4. templateUrl: 'index.php',
  5. controller: 'controller'
  6. })
  7. .when('/search/:p_id', {
  8. templateUrl: 'index.php?page=search',
  9. controller: 'controller'
  10. })
  11. .otherwise({
  12. template: 'Nothing here to see.'
  13. });
  14. }]);
  15.  
  16.  
  17. app.controller("controller", ['$scope', '$routeParams', function ($scope, $routeParams) {
  18.  
  19. }]);
  20.  
  21.  
  22. app.controller("controller", function ($scope, $http) {
  23. $scope.show_results = function () {
  24. $http.get("handlers/search.php")
  25. .success(function (data) {
  26. $scope.results = data;
  27. });
  28. };
  29. }
  30.  
  31. <img class='img-practice' src='uploads/{{x.img}}'>
  32. <div class='pt-1'>{{x.name}}</div>
  33. </a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement