I made another experimet in code:
var app = angular.module("app", []);
app.controller("appCtrl", function ($scope) {
var x;
$scope.$watch('myData', function () {
if ($scope.myData) {
//here here you can handle your data
x = $scope.myData;
console.log('myData:', $scope.myData);
}
});
console.log('my x:', x);
Result is undefined. Why?
my x: undefined app.js:12 <http://localhost:7007/Scripts/app.js>
myData: world
Hi Denis,
>
> No that's not the only way, but it's an easy way to get started,
> What do you know already of angular?
> you already know something about modules and dependency injection ?
>
> here is another plunk, http://plnkr.co/edit/eauguSJOoATrATATwn6E?p=preview
> if you have questions about it, don't hesitate to ask!
>
> Regards
> Sander
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.