1. Templateurl and routing to run under the Web server.
2. Use template Replace set to True, the template should also have a corresponding label, otherwise no data appears.
After 3.1.2 version, the Ngroute module is independent.
4. An empty controller does not define an error.
The link parameters for 5.Directive are sequential: Scope,element,attrs,ctrl
6.ng-repeat objects that cannot be recycled. Hack:ng-repeat= "thing in Things track by $id ($index)"
7. As far as possible update the properties of the variable rather than the individual variable itself.
8. Note that Ng-repeat,ng-controller can produce independent scopes.
9. When jquery is loaded, use jquery, otherwise the built-in jqlite is used. All element references in angular are always wrapped with jQuery or jqlite; They are never raw DOM references.
10.Uncaught Error: [$location: Ihshprfx] A label did not remove <a href= "#" ng-click= "SomeMethod ();" ></a>
11.error:listen eacces when in Linux, this error occurs because of the port you are listening to, here I am 33. Change it to a large number of ports such as 8080 or 3030. There is a rule that these ports are preferably greater than 1024.
The select cannot be displayed when there is no ng-model. Similarly, when you encounter an inability to display the best look at the document is less.
Complement: When the source of the ng-options, with the writing does not match the situation will appear when all the choices, as follows:
var a = [{"id": 1, "name": "Ryan"} ...], ng-options= "ITEM.I as Item.name for item in a"//I is different from ID
----------------------------------------------------------------------------------------
13.ng-bind-html-unsafe has been removed and can be used [' ngsanitize '] module or use $SCE service
From StackOverflow
You indicated ' re using angular 1.2.0 ... As one of the other comments indicated, Ng-bind-html-unsafe has been deprecated.
Instead, you'll want to do something like this:
Copy Code code as follows:
<div ng-bind-html= "Preview_data.preview.embed.htmlSafe" ></div>
In your controller, inject the $SCE service, and mark the HTML as "trusted":
Copy Code code as follows:
Myapp.controller (' Myctrl ', [' $scope ', ' $sce ', function ($scope, $SCE) {
// ...
$scope. Preview_data.preview.embed.htmlSafe =
$sce. trustashtml (preview_data.preview.embed.html);
}
This is the ' ll want to be using 1.2.0-RC3 or newer. (They fixed a bug in RC3 so prevented "watchers" from working to properly on trusted HTML.)
See more ANGULARJS syntax, you can pay attention to: Angularjs reference Manual in English, also hope that we support the cloud habitat community.