Angularjs 基于环境的webpack typescript 2设置

Angularjs 基于环境的webpack typescript 2设置,angularjs,node.js,Angularjs,Node.js,我有一个角度服务,需要访问2个不同的基于npm环境的url,但我不知道如何做到这一点 假设在dev中(在我的机器上),我应该 authenticate(login: string, pass: string): Observable < boolean > { return this.http.get('http://some_url') .map((response: Response) => response.json());

我有一个角度服务,需要访问2个不同的基于npm环境的url,但我不知道如何做到这一点

假设在dev中(在我的机器上),我应该

    authenticate(login: string, pass: string): Observable < boolean > {
        return this.http.get('http://some_url')
            .map((response: Response) => response.json());
    };
可能吗? 如何做到这一点


谢谢

define插件应该可以做到这一点

    authenticate(login: string, pass: string): Observable < boolean > {
        return this.http.get('http://some_other_url')
            .map((response: Response) => response.json());
    };
process.env.npm_lifecycle_event