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

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?
Angular-Cli Best way to manage notices
Puzzling angular-cli AOT error
Create Project with Angular 4 Release using angularcli
addons removed in angular-cli.json whats the replacement

Categories

HOME
visual-studio-2015
security
batch-processing
signalr
elixir
oauth
scipy
matplotlib
appmaker
recyclerview
phaser-framework
rebol
user
lotus-notes
cartodb
lstm
dendrogram
bootstrap-popover
alfresco-share
distance
jconsole
flexboxgrid
embedly
avplayeritem
richfaces
iis-10
pipelinedb
solidworks
hana-studio
preg-grep
swiftcharts
geopy
mapguide
windows-10-iot-core
openshift-enterprise
mmdrawercontroller
react-native-router-flux
ideone
shutdown
udev
crash-reports
python-hypothesis
bettercms
garrys-mod
nsfetchedresultscontrolle
ebtables
libreadline
c#-interactive
excon
visible
firepath
multilingual-app-toolkit
gemini
bluesnap
windows-vista
wikitext
built-in
base32
connection-reset
pyopengl
cpu-cores
code-first-migrations
hiera
magento-1.12
low-level
android-search
candidate-key
omnifocus
dache
phpdocx
lumx
dvcs
map-force
android-json-rpc
baucis
wic
nservicebus4
sslexception
dynamic-binding
vertical-scrolling
process-monitor
zend-framework-modules
crocodoc
git-filter-branch
web-safe-fonts
blockingqueue
javascriptserializer
datarepeater
mpmovieplayer
redirectstandardoutput
macruby
rose-db-object
visual-web-gui
server-error
openvg
integer-promotion
microsoft.ink
act
method-signature

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