I have a trouble to dive into AngularJS on Onsen UI.
I don't make sense what is wrong the following code. I want to show the string 'First Page' instead of {{initialText}}.
Please give me some advice.
Index.html
<head>
...
...
<script>
var module = ons.bootstrap('myApp', ['onsen']);
module.controller('AppController', function($scope) { });
module.controller('PageController', function($scope) {
ons.ready(function() {
console.log('FirstPage');
$scope.initialText = 'First Page';
});
});
</script>
</head>
<body ng-controller="AppController">
<ons-navigator var="myNavigator" page="page1.html">
</ons-navigator>
</body>
page1.html
<ons-page ng-controller="PageController">
<ons-toolbar>
<div class="center">Navigator</div>
</ons-toolbar>
<div style="text-align: center">
<br>
<p>{{initialText}}</p>
</div>
</ons-page>