javascript - Can't initialize values in angular -
I'm just starting with AngularJS and actually killed a simple snake that I just could not find the last page When I load, I want to do something, initialize some values. This is not the case here:
var Booking AppModule = angular.module ('bookingApp', []); BookingAppModule.controller ('bookingController', ['$ theme-area', function ($ scope) {$ scope.bookingDate = '2014/04/28'; $ scope.alertMessage = "start";}]); & Lt; / Script & gt; & Lt;
The input id = "date" of the id = "bookingapp" "" & gt; {{bookingDate}} under the div id = "booking app" Ng model = "bookingDate" />
{{alertMessage}} Am I missing here, Btw, I also tried to put an init? Using the function () and NG-Init = "Init ()" on the controller, but it does not work either. I can initialize values using init = "bookingdate = ..." but not That's what I insert the ng-app attribute in the HTML tag. Refer to the NG-controller in the booking - App Deal like this:
"booking-app" Ng-controller = "bookingController" & gt;
Comments
Post a Comment