angular-cli


Lazy load component in #angular/cli project


I have an angular 4 cli project. I need to load component by its name(without #angular/router). How to import js module of my component in runtime?
That is my load function:
load(path) { //path: 'app/demo/demo-001/demo-001.component'
System.import(path).then( ctype=> {
this.componetFactoryResolver(ctype) ...
}); // Error: Cannot find module 'app/demo/demo-001/demo-001.component'
}
If I require with constant name, It works
let m = require('app/demo/demo-001/demo-001.component');
If dependency is expression, It does not work
let m = require(path); //WARNING: Critical dependency: the request of a dependency is an expression
Should I configure something in .angular-cli.json?

Related Links

Angular Cli e2e element explorer not responding
Angular cli generate a service and include the provider in one step
Angular-cli not generating dist directory with ng build
How to update service json or array value on click in angular2?
How to revert from Angular-cli to Angular without cli for server-side rendering with Angular Universal
How to change file index outside the root
angularCLI Access-Control-Allow-Origin Multiple Origin Domains
Angular CLI how to merge json files
Angular CLI (ng) use single instead of double quotes
can't install angular cli on ubuntu 16.04
How to solve No 'Access-Control-Allow-Origin' header is present on the requested resource with angular 2 service written with angular-cli?
Usage of watch parameter in eject command of Angular CLI
Serving and testing a bundle after ng build
routerLink stopped working in #angular/cli
How to run Angularcli project with https
what is npm i bootstrap#next?

Categories

HOME
sass
admin-on-rest
vhdl
nlp
windows-7
jbehave
aem
otrs
sequelize.js
pygame
rfid
wysiwyg
camera-calibration
equalizer
ida
sendkeys
pyyaml
off-canvas-menu
anychart
ng-show
ip-camera
flexboxgrid
sql-update
onsen-ui
multiplayer
searchbar
activepython
tampermonkey
hanami
excel-2013
winscp
jackson-dataformat-csv
postgresql-9.2
google-drive-realtime-api
pox
sidr
nlb
.net-assembly
pmwiki
liquid-xml
ddms
bayesian-networks
stdclass
mod-fcgid
facebook-chatbot
php-ews
lirc
uiviewpropertyanimator
mouseclick-event
pluck
tcserver
mcrypt
butterknife
react-native-fbsdk
iphone-developer-program
adler32
festival
build-process
iostat
tomee
pydio
zurb-foundation-apps
spoofing
pagekit
soda
inotifypropertychanged
contour
gemini
mongo-c-driver
portfolio
except
android-viewholder
affix
mysqldumpslow
registrykey
retro-computing
textkit
webhdfs
integral
leadtools-sdk
ytplayerview
findcontrol
criteria-api
adobe-indesign
git-checkout
adodb
odftoolkit
adcolony
sortable
power-law
proxies
planetary.js
svcutil.exe
roxygen
magicalrecord-2.2
java.util.date
onselect
backbone-relational
adomd.net
reporting-tools
objcmongodb
device-emulation
fluidsynth
android-contextmenu
parameterization
separation-of-concerns
webkit-transform
easygui
testunit
unreachable-code
web-statistics

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App