Angularjs ngSanitize ngRoute ngAnimate plug-in
Angularjs ngSanitize ngRoute ngAnimate plugin learning points: 1. in Angularjs, ngSanitize2. ngAnimate1. ngSanitize in Angularjs allows the browser to analyze html tags 1. introduce js angular-sanitize.min.js2. introduce the plug-in var app = angular in module. module ("myApp", ['ngsanitize']); 3. use <div ng-bind-html = "text"> </div> to bind data 2. introduction to ngRouteAngularJS routing in Angularjs: The AngularJS routing function is a pure front-end solution, which is not the same as the background routing we are familiar. Backend routing: Different URLs are routed to different controllers and then rendered to pages (HTML ). AngularJS frontend routing requires defining the routing rule (routeProvider) for the specified (ng-app) in advance, and then telling (ng-app) through different URLs) the page (HTML) to be loaded and then rendered to the (ng-app) view (ng-view. AngularJS front-end routing, although the URL input is different, the page display is different. In fact, the partial refreshing of the single page (ng-app) view (ng-view) is completed. In this way, AngularJS is a bit standard for single-page applications. AngularJS routing use: Introduce js dependency injection <script src = "http://cdn.bootcss.com/angular.js/1.2.9/angular-route.min.js"> </script> var m1 = angular. module ('myapp', ['ngroup']); m1.config (['$ routeProvider', function ($ routeProvider) {$ routeProvider. when ('/aaa/: num', {template:' <p> homepage content </p> {name} ', // templateUrlcontroller: 'aaa '}). when ('/ccc', {template: '<p> course content </p> {name}', controller: 'ccc '}). otherwise ({redirectTo: '/Aaa'}) ;}]); Data Display: <div ng-view> </div> $ routeParams: $ on $ routeChangeStart $ routeChangeSuccess/Errorm1.run (['$ rootScope', function ($ rootScope) {$ rootScope. $ on ('$ routeChangeStart', function (event, current, pre) {console. log (event); console. log (current); console. log (pre) ;}) ;}]); page Jump: 1. $ location. path ('aaa/100') 2. <a href = "# div1"> </a> ionic routing plugin https://github.com/angular-ui/ui-router <! Doctype html>