Not assigning functions and objects to variables
This is not a grave mistake and it has more to do with style aspect rather than avoid AngularJS error messages. If you first define a function and then pass it into Angular internal’s declarations you would be benefited in many ways. Firstly, if your functions and objects are assigned to a variable, you would be able to manipulate and mutate them easily. Secondly, by keeping this practice you are actually enhancing the maintainability of your code as it looks cleaner for it can be split into files.
NG-model does not have a dot
You might have often heard that AngularJS ng-model should have a dot. See below ng-model=”itemToAdd” does not have a dot.
Although, in simple apps the code may work either way but in complex apps it may not. Hence, AngularJS Experts recommend you to put a dot in the value of ng-model as a good practice.Accessing the scope via the DOM rather than the console
But remember not to use it outside the console because if you call .scope()on a DOM node when $compileProvider.debugInfoEnabled is set to false, it will return undefined. If you still want to access the scope during production call angular.reloadWithDebugInfo() from the console and the application will work accordingly.
