开发者

ExtJs namespace alias

开发者 https://www.devze.com 2023-03-19 20:09 出处:网络
Is there any way to give a namespace an alias? ergo i want to do Ext.ns ( \'somereallylongname\' ); and then alias it to \'srln\'

Is there any way to give a namespace an alias?

ergo i want to do

Ext.ns ( 'somereallylongname' );

and then alias it to 'srln' and be able to do

Ext.ns ( 'srln.panel');

and create it by

Ext.create('somereallylongname.panel');
开发者_运维百科

Example is a bit contrived, but meh.


Try

Ext.ns ( 'somereallylongname' );
var srln = somereallylongname;

added

make sure srln is in global scope

0

精彩评论

暂无评论...
验证码 换一张
取 消