Saturday, 28 October 2017

Angular Basic Interview Questions Set-1

1)What is bootstraping in angular JS ?
Bootstrapping in angular JS means, The process of angular code getting initialized/loaded.
This process can be in 2 ways where angular provided to us one is auto bootstrap and another is mannual bootstrap.
1.Auto Bootstrap : Auto bootstrapping can be done by simply providing the ng-app directive in any of the HTML element and here that element becomes as root element of angular.
Ex: <div ng-app="angapp">  </div>
2.Mannual Bootstrap : Mannual bootstrapping means, the developer itself makes a decission when to

Monday, 23 October 2017

Checkbox in angular JS


In HTML, we knew that chcekbox is the control that which allows us to select multiple options. based on the selection, the value of the checkbox results in Boolean format either true if checked or false if not.
“checked” is the attribute which is used to check the checkbox(which can also used for radio button too).  
If we provide the “checked” attribute as true, Then the state of the checkbox is checked, thing to note is even we provide the checked attribute value as false it behaves as like true itself.

<input type="checkbox" checked="true" >Architect<br> à Results as checked
<input type="checkbox" checked="false" >Developer<br> à Results as checked even false

Dealing the selection in angular :

Sunday, 22 October 2017

Cascading drodownlist in angular JS



Selection of one dropdownlist resulting the data in another dropdownlist is nothing but the cascading dropdowns where we may face this functionality frequently while developing web apps. Ex: based on our country selection from one dropdown displaying its state in another drodownlist.
ng-options is the directive that which can be used to the select tag type markup elements and can able to pass object details also to its concern element.
If you are new to dropdownlist in angular JS please have a look on my article “Dropdownlist in angular JS”. 


Initially let me create relational static object data variables as like below :

Friday, 20 October 2017

Custom Filter in Angular JS


To get start with some built-in filter please click here .
Even though angular provided us built-in filters, Angular JS also allows us to customize the filters
and manipulate the data based on our needs while displaying in view which can be done by the API
provided by the angular.
Angular JS provided us the filter method type of API which can be appended to the module level in angular application module object.


Creation of filter :

It’s very simple to create a filter like we create a module as app.module(), service as app.service(),.,.etc.

Wednesday, 18 October 2017

Filters in angular JS


Filters in angular JS are used to format or transform our data in our required way (Ex: Formatting the given data into date if possible). By using the filters in angular JS we can also use the search operation from a list of data easily.
Filters in angular JS can be used within the expression({{ }}) or within the directives .
Let’s look over some of default or inbuilt filters provided by the angular JS :
1) uppercase : uppercase filter in angular JS is used to format or convert our data into upper case(angular to ANGULAR).

Friday, 6 October 2017

Differences between ng-repeat and ng-options


Differences between ng-repeat and ng-options
$scope creation :
ng-repeat - For every iteration over the collection it will create the new $scope
ng-options - For every iteration over the collection it will not create the new $scope


Thursday, 5 October 2017

Dropdownlist in angular JS

   In general the dropdownlist in HTML is formed based on the select tag and it's items with the option tag.Angular JS provided us the special directive to deal with the option tag named 'ng-option'.
ng-option in angular JS is used to build option tag dynamically based on the collection of items that which render as items in dropdownlist.ng-options directive can hold of types array or object.

Wednesday, 4 October 2017

ng-repeat in angular JS

ng-repeat in angular JS is a directive that which has to be used in the HTML tag.The main purpose of this directive is to repeat the concern tag for number of times. I can say it as just like foreach loop mechanism.
By using ng-repeat directive we can create the collection of data with certain tag(li,p,td...e.t.c) that what we want to render on the page.
ng-repeat directive can hold or loop the data of type array or an object.


Sunday, 1 October 2017

$Scope & $rootScope in angular JS

$scope in angular JS is an object.
$scope acts like a glue between the controllers and the views.
In technical terms we can define $scope members as local members, which are related to its concern controller.
The access levels of $scope is permitted to the controller level and can also be in service.
$scope members of one controller cannot be shared with the other controllers.