के भीतर से ही सांस कार्य से rootPath सेट तक पहुँचने के लिए कैसे मैं निम्नलिखित कार्य है कि अपने आवेदन का निर्माण किया है:कोणीय आवेदन
const app = new Metalsmith(config.styleguide.path.root);
app.use(
msDefine({
production: false,
rootPath: '/'
})
);
app.use(
msIf(
gutil.env.config === 'release',
msDefine({
production: true,
rootPath: '/styleguide/'
})
)
);
app.build(...);
मैं आवेदन के भीतर से rootPath
का उपयोग करने की जरूरत है, उदाहरण के लिए:
import stuff from 'stuff';
export class IconCtrl ...
...
_getIconPath(name: string, size: string): string {
switch (this.version) {
case 'current':
return `${stuff.rootPath()}/current/icn-${name}-${size}.svg`;
default:
return `${stuff.rootPath()}/legacy/${name}.svg`;
}
}
...
मुझे अब तक ऐसा करने का एक साफ तरीका नहीं मिला है। मुझे यकीन नहीं है कि ऐप के भीतर से बिल्ड समय पर एप्लिकेशन कॉन्फ़िगरेशन का उपयोग कैसे करें।
यह कर न करें। एक ऐप बूटस्ट्रैप प्रदाता को अलग से सेट करें या एक जेएसओ फ़ाइल बनाएं जिसे – Gary
दोनों द्वारा एक्सेस किया जा सकता है क्या आपने इसके बजाय बेसपाथ बदलना माना है? Https: //www.w3schools.com/tags/tag_base.asp – jornare