After creating the Modelr flow and the UI service, you call them from the app pages.
let w of weatherdata?.weather; let i = index
JavaScript |
//Importing the UI service |
JavaScript |
async getWeatherModelr(cityName) { |
Page Implementation
JavaScript |
/*DEFAULT GENERATED TEMPLATE. DO NOT CHANGE SELECTOR TEMPLATE_URL AND CLASS NAME*/ |
JavaScript |
/*DEFAULT GENERATED TEMPLATE. DO NOT CHANGE SELECTOR TEMPLATE_URL AND CLASS NAME*/ |
Property | Value |
*ngFor | let logObj of logArray; let i = index |
[ngStyle] | {'color': logObj.type === 'error' ? 'red' : 'green'} |
Open the TS tab of the log page and update the page implementation to the following:
JavaScript |
/*DEFAULT GENERATED TEMPLATE. DO NOT CHANGE SELECTOR TEMPLATE_URL AND CLASS NAME*/ |
After updating the TS of the page, if you had seen the property not available error before, then navigate back to the weathersearch page. Double click the log view on the weathersearch page, and click the refresh icon to refresh the attributes of the log view.