博文

目前显示的是 十二月, 2017的博文

jQuery and Form

inside posting page function postToError ( CBaseError ) { var e = encodeURI ( JSON . stringify ( CBaseError . errors ). replace ( /"/ g , '&quot;' )); //way 1 $('<form action="./ErrorP" method="post"><input name="error" type="hidden" value="'+e+'"></form>').appendTo('body').submit(); //way 2 var newForm = $ ( '<form>' , { 'action' : './ ErrorP ' , 'method' : 'post' }). append ( $ ( '<input>' , { 'name' : 'error' , 'value' : e , 'type' : 'hidden' })); newForm . appendTo ( 'body' ); newForm . submit (); } inside page posted to < script > var Error ={ "errors" :[]}; var e = '@ViewData["Error"]' ; e = e . replace ( /&quot;/ g , '"' ); var a = decodeU

Java 10

New features and enhancements are tracked through either the Java Enhancement Process as JEPs, or through the Java Community Process for standardization requests (JSRs). Ref: https://www.infoq.com/news/2017/11/Java10JEPs http://openjdk.java.net/jeps/1 https://www.jcp.org/en/home/index

Angular Architecture Summary

图片
summarize this architecture : Anuglar apps contain one or more modules. Every angular application has at least one module which is the root module. Each module contains one or more components and services.A component controls a portion of the view on the browser. Each component contains an HTML template and a class to control the logic for that particular view. The template represents the view in the browser. Module can also have services which contains the business logic of your application. The modules export and import code as when required and finally render the view in the browser. Component Selector : there are three ways to specify the selector. Use it                                   @Component                            HTML as a custom HTML tag      selector: 'app-test',                <app-test></app-test> as a class name                   selector: '.app-test2',             <div class="app-test2"> </