Control Your App’s Behavior (Angular.js Controllers)

In our previous Hello World example we simply defined a model [i.e. data.message] in our ng-model directive then we set some value on it and at the same time get the value from it. But how about we pass a predefined message to show at start up. Let me clarify what I'm saying. Let's modify our Hello World Program to look like this, <!DOCTYPE html> <html lang="en" ng-app> <head> <meta charset="UTF-8"> <title>Angular Controller</title&…

Keep reading