Ng-init is used to initialization. In this example of ng-init, test variable is bound with textbox and it is initialized with value "LearnKode" using ng-init directive as ng-init="test='LearnKode'". So wherever the variable is being used, will be set to "LearnKode" . See the code snippet:

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> </head> <body ng-app> <div> <div ng-init="test='LearnKode'"> My WebSite <input type="text" ng-model="test" /> </div> </div> </body> </html>