Hello <first name> <last name> with AngularJS
☰Fullscreen
Table of Content:
Hello with AngularJS
index.js
1. Hello <first name> <last name> with AngularJS
Write a program that uses first name and last name as the input to display the message Hello <first name> < last name>.
Use ng-controller and ng-module (use scope 4 variables first_name and last_name for input fields).
Hello !
Solution
index.html
Hello {{first_name}} {{last_name}} !
index.js
// JS var app = angular.module("myApp", []); app.controller("myCtrl", function($scope) { $scope.first_name = ""; $scope.last_name = ""; });