javascript - Angular, bootstrap-ui with requirejs issues -
i trying use bootstrap-ui on angualr project requirejs.
i think have set correctly seems having issues - here setup -
require.config({ paths: { 'angular': '//thirdparty/angular/1.3.4/angular.min', 'underscore': '//thirdparty/underscore/1.6.0/underscore.min', 'bootstrap-ui' : 'https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap.min', 'bootstrap-ui-tpls' : 'https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap-tpls.min', }, shim: { 'angular': { exports: 'angular' }, 'underscore': { exports: '_' }, 'bootstrap-ui-tpls' : { deps: ['angular'], exports: 'bootstrap-ui-tpls' }, 'bootstrap-ui': { deps: ['angular','bootstrap-ui-tpls'] } } });
- i assuming need add tpls - may part of issue?
then define in module i'm using in :
define('file.tabs/directive', [ 'bootstrap-ui' ], function(bootstrapui) { var metadata = { modulename: 'filetabsdirective', componentname: 'filetabs' }; angular.module(metadata.modulename, [ 'ui.bootstrap' ]).directive(metadata.componentname,
and tried using tabset bit in module loading - , getting :
load resource: server responded status of 502 (bad gateway) http://localhost:9000/template/tabs/tabset.html
so it's looking template/tabs/tabset.html - not there. use help, bit confusing. thanks!
you don't need load both libraries, use version templates. difference explained here.
Comments
Post a Comment