Browsed by
Month: May 2017

Passing values using @ViewChild Angular 4/5/6

Passing values using @ViewChild Angular 4/5/6

Passing values using @ViewChild Angular 4: @ViewChild in angular is mainly to communicate between parent and child components. Because a component will have access only to its own template files. We have few more components like @Input and @Output for the same. Today we are going to see actually how to pass a value within a same component itself using @ViewChild instead of two way databinding. Steps in Overview: 1. Import ViewChild and ElementRef from @angular/core. 2. Add a decorator…

Read More Read More

1,286 total views, no views today

Property binding angular 4/5/6 example

Property binding angular 4/5/6 example

Property binding angular 4 example: What is property binding ? Binding html properties like disabled[disabled], class[ngClass] and style[ngStyle] dynamically with component values using angular. You can even create your own custom property using @Input. Syntax: [] Eg: [disabled]   Property binding Types: Element property Component property Directive property In our last tutorial we have seen about event binding and twoway binding. As part of that we have created a simple app, 1. Created two text field with technology name and…

Read More Read More

1,572 total views, no views today

Oracle SQL & PL/SQL Quick Notes

Oracle SQL & PL/SQL Quick Notes

Hi Guys, We come across few queries in oracle and pl/sql on daily development tasks which we forget/wont remember correctly sometime. This post keeps track on those items. Keep visiting this post for the regular updates.   This can be used to refresh for your oracle and pl/sql interviews as well. Feel free to add your thoughts in the comments section to keep the post updated.   1. How to view the procedure full source code? Run the below query…

Read More Read More

597 total views, no views today

Angular 4/5/6 Event Binding + Two Way Databinding Simple Example

Angular 4/5/6 Event Binding + Two Way Databinding Simple Example

Angular 4 Event Binding + Two Way Databinding Simple Example What is Event Binding ? Event Binding in angular adds an event handler which will be triggered on the added event action. For example: <button (click) = “addMe()”> Add Me </button>   Here (click) is a click event in angular binded to addMe() method, so when ever user clicks Add Me button then it calls addMe() function in the respective component of angular. What is Two Way Databinding ? Two…

Read More Read More

1,689 total views, no views today

String Interpolation {{}} in Angular 4/5/6 – Must to know Things

String Interpolation {{}} in Angular 4/5/6 – Must to know Things

String Interpolation {{}} in Angular 4 – Must to know Things: String interpolation is basically used to output the values from the typescript file to template file. Whenever you want to dynamically display the values through backends/http requests/from DB then you can make use of this string interpolation to directly output your contents to templates. But know the things mentioned below to understand and use it at the appropriate places.   String interpolation is defined in angular with {{}} [Double…

Read More Read More

825 total views, no views today

Tools for Angular 4/5/6 Developments

Tools for Angular 4/5/6 Developments

As angular 4 becoming very popular, same time typescript and development text editors like atom and sublime is also becoming very popular.   Angular 4 Development Editors & Tools:   1. Microsoft Visual Studio Code It is free from microsoft. Visual Studio Download Link: Download Microsoft Visual Studio Code     2. Atom Atom is text editor from github team. Atom Download Link: Download Atom Text Editor       3. Sublime It is also a text editor, you may…

Read More Read More

1,052 total views, no views today

How to install Redis on Windows ?

How to install Redis on Windows ?

How to install Redis on Windows ? Redis is an open source, high performance, key-value store. Values may contain strings, hashes, lists, sets and sorted sets. Redis has been developed primarily for UNIX-like operating systems.   Step 1: Download the Redis for windows Download Redis for windows   Step 2: Extract and keep where ever you want     Step 3: Start redis server Run redis-server command redis-server       Step 4: Now open new cmd prompt to run…

Read More Read More

917 total views, no views today

How to use Angular 2 Material in Angular 4/5/6

How to use Angular 2 Material in Angular 4/5/6

How to use Angular 2 Material in Angular 4/Angular-CLI:   Important note: Due to breaking change in angular material 2, steps are changed to integrate with angular 4 cli. Below post is created with the latest updates and explained step by step. Please refer the below link. [Updated] Adding Angular Material 2 to Angular 4 CLI Please don’t follow from here, it wont work with latest angular material 2     Angular material is a CSS¬†framework like bootstrap for angular…

Read More Read More

844 total views, no views today

[Resolved] Cannot find module ‘@angular/animations’

[Resolved] Cannot find module ‘@angular/animations’

[Resolved] Cannot find module ‘@angular/animations’ When you are using angular material with angular 4 then you will come across this error “Cannot find module ‘@angular/animations’“. In angular 2 when you install angular material angular animations also will be installed and imported from core. but now in angular 4 angular animation is moved to a separate package and angular/core is deprecated. So inorder to make the animation work properly with angular 4 then you need to install angular animation separately, npm…

Read More Read More

1,113 total views, no views today

Difference between @Controller and @RestController

Difference between @Controller and @RestController

Difference between @Controller and @RestController: @Controller and @RestController is not having much difference, its just a matter of convenience to use @ResponseBody with @Controller. In simple way, we can understand like this: @RestController = @Controller + @ResponseBody     @Controller: @ResponseBody annotation should be used for RequestMapping methods to render any outputs like json/xml etc.   Code Sample: Here @ResponseBody annotation is used for¬†getStringWithController() method. @Controller public class UserControllerWithoutRest { @RequestMapping(value = “/samplejson”, method = RequestMethod.GET, produces = { “application/json”,…

Read More Read More

850 total views, 1 views today