notes to take care when developing with AngularJS

1. in 1.3.X you cant use anonymous CTRLs, so this:
<div ng-app="">
   <div ng-controller="FisrtCtrl" >
        .......content......
 
  </div>
</div>

<script>function FisrtCtrl($scope){.........};</script>
will not work anymore, you must use

you will get this error "'argument 'FirstCtrl' is not a function, got undefined'".
the simple sln is:
<div ng-app="myApp">
<script>
   var myApp = angular.module('myApp');
   myApp.controller('FisrtCtrl', function ($scope){.........});
</script>

2. if by any case u've written a code that fails your services constructors (funtions) will not be called.
be thing to do is to write a super simple CTRL to call a string from it.

3. binding HTML must be done with a filter as shown here
http://creative-punch.net/2014/04/preserve-html-text-output-angularjs/
or some extra JS libraries
http://blog.29steps.co.uk/post/60867715914/dynamically-output-html-within-angularjs

Comments

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

Asp.Net Ending Response options, Response.End() vs CompleteRequest()