Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.config(['$routeProvider', function ($routeProvider) {
- $routeProvider
- .when('/', {
- templateUrl: 'index.php',
- controller: 'controller'
- })
- .when('/search/:p_id', {
- templateUrl: 'index.php?page=search',
- controller: 'controller'
- })
- .otherwise({
- template: 'Nothing here to see.'
- });
- }]);
- app.controller("controller", ['$scope', '$routeParams', function ($scope, $routeParams) {
- }]);
- app.controller("controller", function ($scope, $http) {
- $scope.show_results = function () {
- $http.get("handlers/search.php")
- .success(function (data) {
- $scope.results = data;
- });
- };
- }
- <img class='img-practice' src='uploads/{{x.img}}'>
- <div class='pt-1'>{{x.name}}</div>
- </a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement