Agularjs1.2.7+Seajs按需加载插件
agular1.2.7支持IE8+如需支持IE7需要关闭$sceProvider
agular.module('ie7support', []).cofig(fuctio($sceProvider) { $sceProvider.eabled(false); }); 然后注入 ie7supportDEMO https://wvovo.com/gSea/idex.1.2.7.html
Agularjs1.0.8+Seajs按需加载插件目前测试兼容IE6+
DEMO:https://wvovo.com/gSea/#/
有任何问题请在这里留言:https://github.com/ckke/gSea/issues/1
gSeabyKeZRemail ckke@qq.com
Createtime2013/12/5
supportiIE6aboutwiththeAgular1.0.8(becausethe1.2.3otsupportiIE7)
useitijectgSeaAdiruuseapp=$gSea(app);that'sall
Cotactus:QQ117692258
SeaJs配置
seajs.use(['app'], fuctio(app){ agular.bootstrap(documet, ['app']); });加载插件后注入gSea
var app = agular.module('app', ['gSea']);路由配置方式
whe('/t1', { cotroller: 'testACtrl', templateUrl: './app/mod/m1/t1.html', 'cotrollerUrl': 'm1/t1' })Ru期间引入$gSea赋值
app.ru(["$rootScope", "$gSea", fuctio ($rootScope, $gSea) { app = $gSea(app); }]);请保留app里面的register变量使用方式为
module.exports = fuctio(app){ app.register.cotroller('testACtrl', ['$scope', '$routeParams', '$locatio', '$http', fuctio($scope, $routeParams, $locatio, $http){ $http.get('data/testA.jso').success(fuctio(res){ $scope.data=res; }) } ]); }如果选择兼容requireJs或者不考虑IE7一下的话
可以考虑天猪的版本:https://github.com/ckke/agular-lazyload
我的版本只支持SEAjs
评论