Showing posts with label Angular. Show all posts
Showing posts with label Angular. Show all posts
Thursday, August 31, 2017
Wednesday, May 3, 2017
Wednesday, April 12, 2017
Quick reference for Angular 2 changes
Changes in Angular 2 compared to angular 1
- Ngref= href property binding. Browser module has definition to *ngref. Any directive that changes the directive is known as structural directive
*ngFor - No watchers and No digest cycle
- Binding syntax has been changed
- Property binding is done using [ ]
Tuesday, April 11, 2017
Comparison backbone vs ember, knockout vs ember, ember vs angular 1
Comparing backbone vs Ember is not fair
Backbone
- Small set of library sit on top of jquery
- We need to write own abstractions to sit on backbones core part
- Uses collections and models
- Does not try to abstract everything away rather it leaves to us
- Developer who does not mind writing code his way this is a fine choice
Ember
- If we do not want every single detail in your application focus solving the problem on hand instead how you solve Ember is a good choice
Tuesday, January 24, 2017
Sunday, August 21, 2016
Monday, February 29, 2016
Batarang chrome extensions for debugging angular applications
Saturday, February 13, 2016
Monday, November 30, 2015
Exception handling in Angular using $exceptionHandler
Handling uncaught exception
Edit in plnkrSteps involved
- Use $provide service in config section as shown below
Note:We need to customize the handler action
In the example shown below $scope is not defined. This exception is handled and alert is shown to the user
Wednesday, November 25, 2015
Angular ng-class for error message
We can use angular ng-class to change the style based on error.
Edit in plunker
ng-Class : Directive allows us to dynamically set CSS classes on an HTML element by data binding an expression that represents all classes to be added.
Steps involved
- Include css class
- Use control-group class from bootstrap
- Specify error condition
Angular Patterns
ng-Pattern : We can use angular patterns to validate input type. adds the pattern validator to ngModel. It is most often used for text-based input controls, but can also be applied to custom text-based controls
Edit in plunkr
Steps involved
Edit in plunkr
Steps involved
- Specify input type
- Specify the angular pattern in regular expression
Friday, November 20, 2015
Issue with installing protractor in windows
I was trying to install protractor in windows 7. However I was no able to install it easily.
I have listed the steps which you need to perform in order to install protractor in windows
I have listed the steps which you need to perform in order to install protractor in windows
npm install -g protractor
The step involves.- Before running the above command install python 2.7.3 https://www.python.org/download/releases/2.7.3
Sunday, November 1, 2015
Angular pass selected item
We need to pass the selected list from the table. This can be achieved by passing the selected item list as shown below
EDIT IN PLUNKER
- On ng-click we need to pass the selected item list as parameter
- We can fetch the selected list in java script function as shown below
Monday, October 19, 2015
Angular two way binding
Two way data binding: When the view changes model changes and when the model changes view changes
Note: In angular we do not need observable as we need in Knockout
Thursday, October 15, 2015
Angular Pagination Directive
Tuesday, October 13, 2015
Excel export from JSON
I have a previous posts on generating Excel file from a table. Unfortunately they do not work in IE. We can generate Excel file from a JSON file as shown below
What do we need?
- JSONtoCSVConverter javascript file.
- JSON Data
- Jquery
This line is important
JSONToCSVConvertor(data, "Blog Report", true);
JSONToCSVConvertor(data, "Blog Report", true);
Monday, October 5, 2015
Why Protractor?
Use : End to End testing
Advantages
- Test like a user
- Improve test efficiency
- Pain point in testing is it is repetitive. It takes care of it
- It always remembers to check everything
- Protractor runs while we are working
- It would interact with the browser faster then humans
- It would enter data faster then humans
Sunday, October 4, 2015
Angular - Export to table (XML, PDF, JSON..)
we can export data from a table into various format including
Json, Xml, Pdf .....
Note: This example would not run in IE
Angular export to Excel
Note: You can refer to my other post where it would support different flavors like Excel, Pdf
Edit in plunker new
Note: For excel it does not allow "-" character. We have to use replace function
Note: For excel it does not allow "-" character. We have to use replace function
$scope.SelectedUsers.selected.Text.replace("– ", "-- ")
Subscribe to:
Posts (Atom)
Labels
- Algorithms (52)
- Apache Kafka (7)
- Apache Spark (21)
- Architecture (8)
- Arrays (23)
- Big Data (98)
- Cloud services (6)
- Cognitive technologies (12)
- Data Analytics (3)
- Data Science (6)
- Design (1)
- Hadoop (26)
- Hive (11)
- Java (2)
- JavaScript (65)
- JavaScript Run-time (12)
- Machine learning (11)
- Maths (6)
- MySQL (1)
- Networking (3)
- No SQL (2)
- Node (20)
- Python (28)
- SQL (40)
- Security (4)
- Spark Grpahx (1)
- Spark MLlib (1)
- Spark Sql (3)
- Spark Streaming (4)
- Sqoop (2)
- Strings (13)
- devOps (1)
- mongoDb (2)
- ssis (3)


