Posts

Showing posts with the label AngularJs

Angular 10 Preview released | what's new in Angular 10?

Image
Angular 10 released it's Preview Angular 10.0.0-next.2. In Angular 9 main focus is to use the Ivy compiler and runtime by default and TypeScript 3.7 version upgradation. In the Upcoming version 10, the main focus is on Bug Fixes and Performance Improvements. List of component/package/module   Bug Fixes and Performance Improvements  included in  Angular 10 : common locales/global/*.js are not ES5 compliant let KeyValuePipe accept type unions with null compiler handle type references to namespaced symbols correctly avoid undefined expressions in holey array record correct end of expression core undecorated-classes-with-decorated-fields migration should avoid error if base class has no value declaration ngOnDestroy on multi providers called with incorrect context avoid migration error when non-existent symbol is imported workaround Terser inlining bug ngcc correctly detect external files from nested node_modules/ display output from the unlocker p...

Angular 9 Is Now Available - What new?

The 9.0.0 release of Angular is here! This release including the framework, Angular Material, and the CLI. This release switches applications to the Ivy compiler and runtime by default, and introduces improved ways of testing components. This is one of the biggest updates to Angular made in the past 3 years, it empowers developers to build better applications and contribute to the Angular ecosystem. How to update to version 9 First, update to the latest version of 8 ng update @angular/cli@8 @angular/core@8 Then, update to 9 ng update @angular/cli @angular/core Ivy Version 9 moves all applications to use the Ivy compiler and runtime by default. Ivy compiler and runtime advantages: Smaller bundle sizes Faster testing Better debugging Improved CSS class and style binding Improved type checking Improved build errors Improved build times, enabling AOT on by default Improved Internationalization Faster testing Previously, TestBed would recompile all compone...

Angular 4 New Features

Smaller and Faster -                      Angular applications smaller and faster View Engine -                      Reduce the size of the generated code for your components Animation Package (Angular Animations) -                     Configure options and set input variables within animations                     Define reusable animations using animation()                     Query for inner elements within animations using query()                     Stagger multiple elem...

String get all content between two characters

          You can get content between symbols even there are other same characters. You can extract a string between two delimiters or two string or symbol. Example : String-> Some Text [Id-123] Output-> Id-123 You can achieve same functionality with out using Regular expression. You can use String operaton. For any programming like Java, JavaScript, C, C++, .Net, AngularJs, You can Use String operation. String str = "Some Text [Id-123]"; String str2 =  str.substring(str.lastIndexOf("[") + 1, str.lastIndexOf("]"));  Output-> Id-123 It will work for any symbol or characters.

404 not found error redirect to a page

Image
                                          tomcat custom http status 404 Error page configuration If a requested page and it does not exist. tomcat default page look like this. Here i am requesting for a page images in my application. But it is not present. Tomcat default error 404 page showing this page. follow below step to override tomcat default 404 error page You can put a custom page. create a the page ' NotFound.html ' in your application home directory. Add the following in web.xml file. ( CATALINA_HOME/conf/web.xml)     <welcome-file-list>         <welcome-file>index.html</welcome-file>         <welcome-file>index.htm</welcome-file>         <welcome-file>index.jsp</welcome-file>     </welcome-file-list>

angularjs convert variable value as key in json

Convert string value as key in json object $scope.attVal={"a":"fsdfsdfsd","b":"asdfas","c":"asdfas","d":"","e":"fas","f":"asd","g":"","h":"","i":"","j":"","k":""}; $scope.selectedAttribute="a"; $scope.attrValue="asdda"; $scope.attVal[$scope.selectedAttribute]=$scope.attrValue; In this example you can see, we are converting a string variable into a json key. and Updating old json by key.

Software development

Object oriented analysis (OOA) Object oriented design (OOD) 1. Start with the simple object which can be abstracted into individual classes. 2. Identify all the classes in the requirement specification. 3. Identify the commonalities between all or small groups of classes. Do not force fit generalization where it doesn’t make sense. 4. Keep all the data members private or protected 5. Identify all the member variables and methods the class should have 6. Ensure that the class is fully independent of other classes and contains all the necessary attributes and methods. 7. The methods in the class should be abstract. 8. Don't use the procedural code into a class for the methods in the class. 9. Inherit and extend classes from the base classes when require. 10. Define the "Has-A" or "Uses-A" relationships among the classes Object oriented programming (OOP) Software development life cycles Entity relationship model (ER model / ER diagrams)...

How to highlight a grid row or column in AngularJs

    columnDefs: [       { field: 'name',cellClass: function(grid, row, col, rowRenderIndex, colRenderIndex) {            if (grid.getCellValue(row,col) === 'xyz') {             return 'blue';           }         }},       { field: 'address',         cellClass: function(grid, row, col, rowRenderIndex, colRenderIndex) {           if (rowRenderIndex===3) {             return 'blue';           }         }       }     ]

How to download a file using a Java REST service ?

Image
Related Question:      How to zip a folder?      AngularJs / JavaScript to download a file using web service. Solution:  @GET     @Path("/report/download/file/{filename : .+}")     @Produces(MediaType.APPLICATION_OCTET_STREAM)     public Response downloadFilebyPath(@PathParam("filename")  String fileName) {