ngSea Angularjs 1.2.7 + Seajs 按需加载插件[](<a href="https://github.com/ckken/ngSea#angularjs-108--">https://github.com/ckken/ngSea#angularjs-108--</a>

程序名称:ngSea Angularjs 1.2.7 + Seajs 按需加载插件[](<a href="https://github.com/ckken/ngSea#angularjs-108--">https://github.com/ckken/ngSea#angularjs-108--</a>

授权协议: GPL

操作系统: 跨平台

开发语言: JavaScript

ngSea Angularjs 1.2.7 + Seajs 按需加载插件[](<a href="https://github.com/ckken/ngSea#angularjs-108--">https://github.com/ckken/ngSea#angularjs-108--</a> 介绍

Angularjs 1.2.7 + Seajs 按需加载插件

angular 1.2.7 支持IE8+ 如需支持IE7 需要关闭 $sceProvider

 angular.module('ie7support', []).config(function($sceProvider) {
        $sceProvider.enabled(false);
    });
    然后注入 ie7support

DEMO http://wvovo.com/ngSea/index.1.2.7.html

[](https://github.com/ckken/ngSea#angularjs-108--

seajs-%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD%E6%8F%92%E4%BB%B6)Angularjs 1.0.8 +
Seajs 按需加载插件

目前测试兼容IE6+

DEMO :http://wvovo.com/ngSea/#/

有任何问题请在这里留言:https://github.com/ckken/ngSea/issues/1

  • ngSea by KenZR email ckken@qq.com

    • Create time 2013/12/5

    • support in IE6 about with the Angular 1.0.8 (because the 1.2.3 not support in IE 7)

    • use it inject ngSea And in run use app = $ngSea(app); that’s all

    • Contact us: QQ 117692258

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

ngSea Angularjs 1.2.7 + Seajs 按需加载插件[](<a href="https://github.com/ckken/ngSea#angularjs-108--">https://github.com/ckken/ngSea#angularjs-108--</a> 官网

https://github.com/ckken/ngSea

相关编程语言

MuPlayer 是一款跨平台、轻量级的音频播放解决方案,...
OS FLV 是一个 开源和可嵌入网页的flv播放器。 这个...
DewPlayer音乐播放器,样式很简单,而且很实用.播放器...
JW FLV MEDIA PLAYER是一个开源的在网页上使用的Fla...
Speakker 是一个基于 Web 浏览器的音乐播放器,只提...
Player Framework 是一个开源的支持 HTML5 的视频播...