我已经完成了
export const environment = {
production: false,
serviceURL: 'url'
}; --> in environments/environment.ts
import { environment } from '../environments/environment';
serviceURL: environment.serviceURL; --> in app.component.ts
但我收到错误
src / app / app.component.ts(17,22):找不到命名空间'环境'
答案 0 :(得分:2)
我认为你的意思是:
serviceURL = environment.serviceURL;
(=
代替:
)