AngularJS & Angular 18 hybrid application: How to inject AngularJS constants/values into...

Discussão em 'Angular' iniciado por Lord Yggdrasill, Setembro 23, 2024.

  1. I am trying to create an AngularJS and Angular hybrid app from a legacy AngularJS app, and I've managed to get it working to some extent. However, I am stuck at dependency injection of AngularJS contents into Angular components/services, specifically with AngularJS constants and values defined like this:

    var app = angular.module("app", ['ngComponentRouter', ...]);
    app.value("$routerRootComponent", "root");
    app.constant("configuration", configuration);


    I've tried following this guide(making AngularJS dependencies injectable to angular), but it only mentions services, no information about values and constants. Do they work in similar ways like services? How do I inject values/constants from AngularJS into Angular?

    Continue reading...

Compartilhe esta Página