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

227
Vistas
angular.module is not function in webpack

I am beginner for learn angular and webpack, I using node command prompt to run angular in webpack, I am just given angular.min.js link in app.js file but the bundle.js not accept the anguar.module(), it is says angular.module is not a function, please help me to achieve this

var angular = require('../node_modules/angular/angular.js');
var ngModule = angular.module('app',[]);
console.log(ngModule);
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

WebPack will load modules directly from node_modules without having to be configured to do so. You just need to add them as entry points in the config.

webpack.config.js

entry: {
    vendor: ['angular'],
    app: './src/app.js'
}

You can add other modules like lodash or jquery this way as well.

Now in your code you can use angular like this

import angular from 'angular';

export default angular.module('app',[]);

You can then import the module in other JS files like this.

import app from './app.js';

app.directive('myWidget',.....);
over 4 years ago · Santiago Trujillo Denunciar
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