#Function loads twice
17 messages · Page 1 of 1 (latest)
its only ones in there but if i check the console
its executed twice
can anybody tell why its like that?
Function calls aren't recommended in templates as there are called on each change detection.
oh okay yes thats making sence
how could i change that...
i just want that if the site refreshes/loads it calls the funciton
On refresh/loads the component will be initialized. You can initialize a local property of your component with related data
Please provide more context firstly: your function doesn't do anything here.
What do you want to display in the template?
i know i will be adding it soon, the code of the function i want firstly that the function only get load onnce