angular1.2.7支持IE8+如需支持IE7需要关闭$sceProvider
angular.module('ie7support', []).config(function($sceProvider) { $sceProvider.enabled(false); }); 然后注入 ie7supportDEMO https://wvovo.com/ngSea/index.1.2.7.html
Angularjs1.0.8+Seajs按需加载插件目前测试兼容IE6+
DEMO:https://wvovo.com/ngSea/#/
有任何问题请在这里留言:https://github.com/ckken/ngSea/issues/1
ngSeabyKenZRemail ckken@qq.com
Createtime2013/12/5
supportinIE6aboutwiththeAngular1.0.8(becausethe1.2.3notsupportinIE7)
useitinjectngSeaAndinrunuseapp=$ngSea(app);that'sall
Contactus:QQ117692258
SeaJs配置
seajs.use(['app'], function(app){ angular.bootstrap(document, ['app']); });加载插件后注入ngSea
var app = angular.module('app', ['ngSea']);路由配置方式
when('/t1', { controller: 'testACtrl', templateUrl: './app/mod/m1/t1.html', 'controllerUrl': 'm1/t1' })Run期间引入$ngSea赋值
app.run(["$rootScope", "$ngSea", function ($rootScope, $ngSea) { app = $ngSea(app); }]);请保留app里面的register变量使用方式为
module.exports = function(app){ app.register.controller('testACtrl', ['$scope', '$routeParams', '$location', '$http', function($scope, $routeParams, $location, $http){ $http.get('data/testA.json').success(function(res){ $scope.data=res; }) } ]); }如果选择兼容requireJs或者不考虑IE7一下的话
可以考虑天猪的版本:https://github.com/ckken/angular-lazyload
我的版本只支持SEAjs
评论