I am creating a web application using Laravel 5.
I want to use AngularJS. I have created a file named all-products.php
in views
directory which contains data in JSON format.
When I gave path to this file in http.open()
it gives an error as http://localhost/user/app/resources/views/all-products.php 404 (Not Found)
.
Here is my JS code:
var app = angular.module("products", []);
app.controller("productsController", function($scope, $http){
$http.get("http://localhost/user/app/resources/views/all-products.php").success(function(response) {
$scope.records = response.records;
});
});
Please tell me how I can solve this ?
Thanks in advance.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1NOPZvr
via IFTTT
Aucun commentaire:
Enregistrer un commentaire