angular5中使用全局变量

建立全局变量ts文件,而后引入php 建立globals.ts文件:api export const base_path = "http://localhost/api/index.php/Home"; 在须要全局变量的代码页引入:post import * as globals from '../../globals'; 而后就可使用这个变量了:url let url = globals.bas
相关文章
相关标签/搜索