Hi @Pero_Knezevic in these days I have done some tests, but without success, I turned a bit on google, and someone recommends the solution of $ compile, but it doesn’t work or I am doing something wrong (surely).
I created a project on github, which would be the base where I start a project, as soon as you can take a look at it and suggest me where am I wrong?
I created PR. You will get point when you see code. You must stick to one controller due ajax page loading but you can identify pages so you can separate code and know when page is inited.
Yes, you are limited, but you can achieve whatever you want. Don’t see what are features you need with every single controller? This is a lack of structure, but functionality-wise doesn’t matter because it works
You can have but controller inside controller only with an alias to some other name inside the controller itself.
You have PR which have the example of this approach with controllers and with pages. Check console log to see what’s going on.
Yea looks strange but surely let’s keep repeating it like it is. I had a lot of issues later when project growth and have multiple pages inside another etc, it can mess things with compile. Maybe the compiler has issues ( I didn’t go so deep inside the problem ) but I have fixed it like this.
If you using this approach with pages to detect where you are and to run some code on the init page, I would suggest keeping using it as is.
You should use it as start and maybe find better way to solve it, but it works as is.