Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

174
Vistas
Accessing Express through angular

Do we need proxypass to access express back end from angular front end when using 2 separate ports in localhost.

     <div class="row" ng-controller="UserController">
            <table class="table">
                <thead>
                <tr>
                    <th>First name</th>
                    <th>Last name</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="user in users">
                    <td>{{user.firstName}}</td>
                    <td>{{user.lastName}}</td>
                </tr>
                </tbody>
            </table>
        </div>

    angular.module('PharmacyApp').factory('UserService', ['$http',
        function ($http) {

            return {
                get: () => $http.get('/users').then(response => response.data),
                add: user => $http.post('/users', user).then(response => response.data),
                getById: id => $http.get('/users/' + id).then(response => response.data),
                addComment: (id, comment) => $http.post('/users/' + id + '/comments', comment).then(response => response.data),
            };
        }]);

Using localhost:4000 I want to invoke a function within a controller in my back-end from Frontend. How to do that?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda