0
我必須從角1.3.x的一個網站遷移到角4.3.0如何在Angular 2中存儲值?
雖然經歷的代碼,我
該應用程序使用某種價值
angular.module('abc').value('externalProviderConfigSettings', {
settingsVersion: "2.0",
facebook: { appKey: '', appSecret: '', redirectUrl: '', state: '', permissions: ['email', 'public_profile', 'user_friends', 'publish_actions', 'manage_pages'] },
twitter: { appKey: '', appSecret: '', redirectUrl: '', state: '', permissions: [] },
linkedin: { appKey: '', appSecret: '', redirectUrl: '', state: '', permissions: ['r_basicprofile', 'r_emailaddress', 'w_share', 'rw_company_admin'] },
google: { appKey: '', appSecret: '', state: '', permissions: [] },
pinterest: { redirectUrl: '' }
});
幾個問題如何在Angular 4.3.0中遷移這些價值。 我正在瀏覽文檔,但無法弄清楚。 同樣存在的.config代碼
angular.module('abc').config
如何處理,在角2? 它是一個很大的應用程序,我想確保我的方法是正確的。
謝謝!
您可以使用服務來處理應用範圍可達狀態:https://angular.io/tutorial/toh-pt4 – wostex