I want to add this piece of AngularJS code into home page. Can someone tell me how
<input type="color" ng-model="vm.bgcolor">
<div ng-style="{'background-color':vm.bgcolor}">
Sample area <br>
{{vm.bgcolor | json:true}} <br>
</div>
I am not so sure about that code but unless AngularJS is included in ElkArte, you should call it first before putting that code in.
I did add Angular to index.template.php . Consider it as adding HTML to a template. Nothing different.
I'll give you two example of addons I wrote using angular:
https://github.com/emanuele45/MessageHistory
https://github.com/emanuele45/PmNotification
@emanuele , thanks. A little prompting too would be great.
https://www.codeschool.com/courses/shaping-up-with-angular-js <= anything I know about Angular comes from this course.
The addons should be quite self-explanatory: the template is in template files, the js is in js files, the whole adding is done via hooks and using template layer, for example:
https://github.com/emanuele45/MessageHistory/blob/master/MessageHistory.integrate.php#L23
Your question is rather generic: "where do I put some code?"
The only answer I can give you is: BoardIndex.template.php is the template of the home page.
If you can narrow down your question and make it a little more specific, it could be easier to pinpoint the answer you are seeking. ;)
The above code adds a colour picker which affects the background. I would like to add it available to end users to change the theme's colour scheme.