javascript - Angular JS not working on IE9 -
i trying migrate webpage angular js. simple spa. has basic components label, texboxes , dropdowns. can page working on chrome , firefox. looking page fails on ie9. in ie9 cant angular js working. asthe page loads following js errors:
script5007: object expected
angular.js, line 318 character 12
script438: object doesn't support property or method 'module'
refernce-module.js, line 6 character 1
script5007: unable value of property 'controller': object null or undefined
refernce-module-controller.js, line 6 character 1
i want mention havent used angular js in html except ng-app(in html tag) , ng-controller (in bodytag).
following controller js code :
referencedatamaintainenceapp.controller('referencedatamaintainencectrl', function ($scope) { $scope.lookup_codes = [ {'key':'fs_asset_class','value':'asset class - fs'}, {'key':'account_actc','value':'non asset class - fs'}, {'key':'account_fee_type_cd','value':'account fee types'} ]; $scope.change_lookup = function() { // console.log(new date('2014-05-02').gettime()); var key = $scope.lookup_codes_model.key; if(key == 'fs_asset_class') { $scope.lookup_codes_details = [{'name':'asset class','description':'testing code lookup module asset class.', 'active':true}]; } else { $scope.lookup_codes_details = []; } }; $scope.addlookupcode = function() { $scope.lookup_codes_details.push($scope.new_lookup_code); $scope.new_lookup_code = getlookupcodeobject(); }; /*----------------------benchmark-----------------------------*/ $scope.benchmarks_details = [{'name':'bench 1','description':'benchmark 1', isnew : false}, {'name':'bench 2','description':'benchmark 2', isnew : false}]; $scope.addbenchmark = function() { $scope.benchmarks_details.push($scope.new_benchmark); $scope.new_benchmark = getbenchmarkobject(); }; /*----------------------holidays-----------------------------*/ $scope.calendar_countries = [ {'key':'aust','value':'australia'}, {'key':'canada','value':'canada'}, {'key':'chinuk','value':'china uk'} ]; $scope.calendar_years = [ {'key':'2012','value':'2012'}, {'key':'2013','value':'2013'}, {'key':'2014','value':'2014'} ]; $scope.change_holiday = function() { var calendar = $scope.calendar_countries_model; var year = $scope.calendar_years_model; if(angular.isundefined(calendar) || angular.isundefined(year)) return; else { if(calendar.key == 'aust' && year.key == '2014') { $scope.calendar_details = [{'date':'1388620800000','description':'new year', isdelete : false}, {'date':'1398988800000','description':'may day', isdelete : false}]; } else { $scope.calendar_details = []; } } //console.log($scope.calendar_years_model); }; $scope.addholiday = function() { $scope.calendar_details.push($scope.new_holiday); $scope.new_holiday = getholidayobject(); }; /*----------------------user defined pam fields-----------------------------*/ $scope.data_types = [ {'key':'date','value':'date'}, {'key':'float','value':'float'}, {'key':'int','value':'integer'} ]; $scope.pam_screens = [ {'key':'account_select','value':'account details'}, {'key':'fund_select','value':'fund detail'} ]; $scope.pams_fields = [{'name':'benchmark tolerance','label':'benchmark tolerance', 'type':'date', 'screen': 'fund_select','active':true}]; $scope.adduseddefpamfields = function() { $scope.pams_fields.push($scope.new_pam_field); $scope.new_pam_field = getuserdefinedpamfieldsobject(); }; /*----------------------broker code maintainence-----------------------------*/ $scope.brokers_details = [{'name':'000200','description':'greenwich options company', 'active':true}, {'name':'000202','description':'weiss peck , greer llc', 'active':false}]; $scope.addbrokercodes = function() { $scope.brokers_details.push($scope.new_brokers_detail_list); $scope.new_brokers_detail_list = getbrokercodeobject(); }; }); function getlookupcodeobject () { lookup_code = { name : '', description : '', active : false }; return lookup_code; } function getbenchmarkobject () { benchmark = { name : '', description : '', isnew : false }; return benchmark; } function getholidayobject () { holiday = { date : '', description : '', isdelete : false }; return holiday; } function getuserdefinedpamfieldsobject () { pam_fields = { name : '', label : '', type : '', sceen : '', active : false }; return pam_fields; } function getbrokercodeobject () { broker_code = { name : '', description : '', active : false }; return broker_code; }
and following module js code :
var referencedatamaintainenceapp = angular.module('referencedatamaintainenceapp', [] );
kindly direct me fix browser issue.
thanks
it helpful see html code of including angular.js, refernce-module.js , refernce-module-conroller.js. because out of error messages guess angular keyword not recognized , therefore .module, referencedatamaintainenceapp assignment , .controller wont work.
maybe this thread may help.
Comments
Post a Comment