Description: Here is a miscellaneous, there is no unified summary OH
- ANGULARJS is the MVVM framework
- The load JS file always uses a file with the suffix . min.js, because these files are compressed and can increase the startup speed of the application.
Module Description:
1, config can only inject provide and constant 2, factory, service is generally used to define public functions, using factory need to return an object, service and controller similar to the usual to save temporary data 3, Constant is used only to store constant information, avoid using global variables, define methods: Angular.module (' app '). Constant (myname, ' myname ') 4,Factory,service,constant,value,provider can be injected 5. run.js files need to be pre-processed in the start-up logic 6,Bootstrap relies on jquery, so you must refer to jquery when using bootstrap7, the structure of the General page:
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "Utf-8"> <title>Angularjs Form Example</title> <Linkhref= "Bower_components/bootstrap/dist/css/bootstrap.min.css"rel= "stylesheet"> </Head> <BodyNg-app= "App"> <articleNg-controller= ' FormcheckctrlAs FormCheck '> < Sectionclass= "Container-fluid"> </ Section> </article> <Scriptsrc= "Bower_components/angular/angular.min.js"></Script> <Scriptsrc= "Src/config/app.js"></Script> <Scriptsrc= "Src/config/config.js"></Script> <Scriptsrc= "Src/config/run.js"></Script> <Scriptsrc= "Src/filters/password.js"></Script> <Scriptsrc= "Src/factory/platform.js"></Script> <Scriptsrc= "Src/controllers/formcheckctrl.js"></Script> </Body></HTML>
8. Usage of angular.extend: Some of the objects overwrite or update the values in the object, if there is no data in the object.
9, General login information and other user key information, using localstorage storage, need plug-in ngstorage
10, the use of monitoring: $scope. $watch (xxxx,xxxxx),
This is required if you use the VM form:
$scope. $watch (function () {return vm.password;}, Checkpassword);
If you use the $scope form:
$scope. $watch ("$scope. Password", Checkpassword);
First, Angularjs basic understanding