Images in HTML

In html document, images are added via img element where the src attribute contains the url to the image path. Images example: <img src=”image.jpg”> There are different types of image format like jpg, png, gif, bmp etc. There is a attribute called “alt” which is used to give alternate information about the image or in […]

HTML Entities

In many different language HTML language is used. So it contains different types of symbols or entities which are not english alphabet. These entities starts with ampersand character and finish with semicolor character. For e.g. &quot; Here is a list of entities examples: &quot; “ &apos; ‘ &amp; & &lt; < &gt; > &pound; £ […]

The URLs

URLs or Uniform Resource Locator is location of html document web. It consists of three parts i.e. Protocol, Domain and Resource path. For e.g. http://www.namasteui.com/index.php where http is protocol, www.namasteui.com is domain and index.php is resource path. It also has a query string i.e. http://www.namasteui.com/index.php?value=1&page=3 So the query string for the above url is: ?value=1&page=3 […]

AngularJS Modules

Modules are used to seperate logics and keep the code clean. So we can define modules in separate js file. Here we will create two modules i.e. Controller Module and Application Module. Controller Module: controller.js Here we are declaring a controller userController module using myApp.controller function. myApp.controller(“userController”, function($scope) { $scope.user = { first_name: “Tim”, last_name: […]

AngularJS Controller

To control the flow of data AngularJS mainly relies on controllers. It is defined using ng-controller directive. Controller contain attributes, properties and functions. Example of Controller: <html> <head> <title>AngularJS Controllers</title> <script src=”http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js”></script> </head> <body> <h2>AngularJS Controllers</h2> <div ng-app=”ngApp” ng-controller=”nameController”> First name: <input type=”text” ng-model=”name.firstName”><br><br> Last name: <input type=”text” ng-model=”name.lastName”><br> <br> Full name: {{name.fullName()}} </div> <script> […]