Skip to main content

Hello World Program in Angular 2

         Before we start the angular development, we need to install node setup to your environment. Please download node latest version and install it. Once installed it, you will open a terminal or command prompt to type the following command.

       node --version

The above command was shown installed node version details.

Then install for AngularCLI for globally.
      npm install -g @angular/cli


Create a new Project

Generate a new project by using angular cli. We execute the following command

        ng new welcometolearntoday 

Fig:


Then automatically Angular related packages are generated. the following image is shown the list of file names are generated.

Fig:


Then go to project folder:

cd welcometolearntoday 

now start to run the angular application

ng server --open

Now, the following url is generated and open the browser.

http://localhost:4200/

Fig:














Comments

Popular posts from this blog

How has lockdown impacted Indian farmers?

How has lockdown impacted Indian farmers?             Generally compare to other sectors it's not major impacted by our Indian farmers but we acceptable minor impacts. Here we separate major two farming cultures one is mono farming culture another one poly farming culture. Mono farming :             The major impacts from our Indian farmer for monoculture. Here I have briefly explained what are the things we had faced our local farmers. Here I explain two different crops type: Daily crops : * We harvest more than 100-kilo grams daily crops like brinjal but we unable to sell those in local markets. * We are unable to reach urban markets. * We don't have enough transport facilities. * We unable buy require fertilizer and other complements * In the early stage we are facing manpower shortage but later it's not an issue. * We unable to do value-added products. * Waste is very high for somedays Se...

How to use ng-href directive in AngularJS

ng-Href Directive                  ng-Href directive is hyper link markup to a text in angularJs. This hyperlink will change able to implement dynamic url {{hash}} value. Hash value to assign in a controller to happened user click event fire to assign dynamic url. This Value is undefined means it will return to 404 page. ng-Href directive Example  HTML:      <div ng-app="anchor">     <div ng-controller="anchorController">         <a ng-href="http://www.google.com" ng-click="show($event)">Anchor Tag</a>     </div>   </div> Javascript :  var anch = angular.module('anchor', []); anch.controller('anchorController',['$scope', '$window', function($scope, $window){     $scope.show = function(obj) {       $window.open(obj.target.href);     } }]); Result :  Dem...

Sensors

A sensor can be identifying the environment changes from the surrounding of the device. In the earth who are live plants, animals and human beings have some basic sensing behavior by nature, so those approaches and behaviors we fallowed and implement to nonliving things. These are the major behavior we identify from the sensors like light, sound, motion, temperature, pressure, acceleration, position, Object presence, and Air. Here I'm sharing few components 1. Temperature Sensor Temperature sensor sensing the circumstance of temperature in the installed places. 2. Ultrasonics Sensor Using ultrasonic to identify the obstacle distance in front of the device and based on the data we can manipulate the application. 3. Pressure Sensor Find the pressure value on the device to you gave the pressure on it. 4. Water Level Sensor A water level sensor sensing the water level in the water tank and based on value trigger the applications.  5. Motion Sensor The mot...