my app showing empty select field first entry. have read other solution given , tried still not working. my controller code is: .controller('usercreatecontroller', function(user,profile,auth) { alert("hello"); var vm = this; vm.type = 'create'; profile.all() //this service fetch profiles shown in select field .success(function(data){ vm.profile = data; }); vm.userdata.profile = vm.profile[0]; //here have set default value select field and html page is: <label class="col-sm-2 control-label">profile</label> <div class="col-sm-8"> <select ng-model="user.userdata.profile" ng-options="person._id person.profilename person in user.profile"> </select> </div> hierarchy of vm.profile { "_id": 46, "profile": objectid("5516498e95b84548156db754"), "isactive": true, "password": "$2...
here's quote bruce eckel's book "thinking in java": the method argument list specifies information pass method. might guess, information—like else in java—takes form of objects. so, must specify in argument list types of objects pass in , name use each one. i don't it. think can pass primitives method (e.g. int) , primitives aren't objects. example: public static int multiply(int x, int y){ return x * y; this method , there primitives in it, no objects @ all. the author doesn't only objects can passed methods. quote comes in context of chapter called "everything object" . aims highlight object-oriented aspect of language, includes section on primitives explains special case. nevertheless, method taking primitive types still correct implicitly covered "special case: primitive types" section.
Comments
Post a Comment