Uncaught ReferenceError: Parent is not defined

Issue I’m using django-pipeline along with browserify based on the documentation here – http://gregblogs.com/how-django-reactjs-and-browserify/ I have it working perfectly fine when loading NPM/Bower packages like so – ‘build_js’: { ‘source_filenames’: ( ‘js/bower_components/jquery/dist/jquery.js’, ‘bootstrap/js/bootstrap.js’, ‘js/bower_components/react/react-with-addons.js’, ‘js/bower_components/react/react-dom.js’, ‘datatables/js/jquery.dataTables.js’, ‘datatables/js/dataTables.bootstrap.js’, ‘js/node_modules/marked/marked.min.js’, ‘js/node_modules/react-router/umd/ReactRouter.js’, ‘js/child.js’,

Continue reading

Django-pipeline invalid syntax

Issue I am trying to setup django-pipeline in my test project, however, I am running into a bug which doesn’t have an obvious solution. Here is the pipeline configure in the settings.py PIPELINE = { ‘PIPELINE_ENABLED’: True, ‘COMPILERS’: (‘pipeline_browserify.compiler.BrowserifyCompiler’, ),

Continue reading

django-pipeline wipes out my entries in Django Database Cache

Issue I’m working on a Django application which uses django-pipeline for dealing with browsers’ file caching issues (and also for other benefits). STATIC_URL = ‘/static/’ STATICFILES_STORAGE = ‘pipeline.storage.PipelineCachedStorage’ STATICFILES_DIRS = ( os.path.join(PROJECT_ROOT, ‘bower’), ) STATICFILES_FINDERS = ( ‘django.contrib.staticfiles.finders.FileSystemFinder’, ‘django.contrib.staticfiles.finders.AppDirectoriesFinder’, ‘pipeline.finders.PipelineFinder’,

Continue reading

RuntimeError when building CSS from SCSS files of Foundation-sites with Django-pipeline

Issue My issue is in the same context as Django-Bower + Foundation 5 + SASS. I’m trying to compile foundation from scss to css. The problem is that I’m encountering the following RuntimeError: /home/hakim/.gem/ruby/2.4.0/gems/sass-3.4.23/lib/sass/exec/sass_scss.rb:287:in `watch_or_update’: File /home/hakim/github/myquotes/static/quotes/app.css doesn’t exist. (RuntimeError)

Continue reading

django-pipeline FileNotFoundError when i perform manage.py collectstatic

Issue It’s last some lines of traceback : File “C:\PycharmDev\TestVirtualEnv\testEnv1\lib\site-packages\pipeline\compressors\__init__.py”, line 247, in execute_command stdin=subprocess.PIPE, stderr=subprocess.PIPE) File “C:\Python34\Lib\subprocess.py”, line 859, in __init__ restore_signals, start_new_session) File “C:\Python34\Lib\subprocess.py”, line 1112, in _execute_child startupinfo) FileNotFoundError: [WinError 2] … And in settings.py : BASE_DIR

Continue reading

Yuglify compressor can't find binary from package installed through npm

Issue I have a fresh virtualenv environment and have got the latest django-pipleline. The JS compression with Closure works perfect, but CSS compression with Yuglify fails, due a node error: STATICFILES_STORAGE = ‘pipeline.storage.PipelineCachedStorage’ PIPELINE_JS_COMPRESSOR = ‘pipeline.compressors.closure.ClosureCompressor’ PIPELINE_CSS_COMPRESSOR = ‘pipeline.compressors.yuglify.YuglifyCompressor’ When

Continue reading

django-pipeline throwing ValueError: the file could not be found

Issue When running python manage.py collectstatic –noinput I’m getting the following error: Post-processing ‘jquery-ui-dist/jquery-ui.css’ failed! Traceback (most recent call last): File “manage_local.py”, line 10, in <module> execute_from_command_line(sys.argv) File “/Users/michaelbates/GoogleDrive/Development/inl/venv/lib/python3.4/site-packages/django/core/management/__init__.py”, line 367, in execute_from_command_line utility.execute() File “/Users/michaelbates/GoogleDrive/Development/inl/venv/lib/python3.4/site-packages/django/core/management/__init__.py”, line 359, in execute

Continue reading

django pipeline FileNotFoundError when the path is right

Issue I’m trying to add pipeline to my django project. But it’s throwing me winerror 2 (FileNotFoundError) when I’m trying to execute collectstatic settings.py STATIC_URL = ‘static/’ STATICFILES_STORAGE = ‘pipeline.storage.PipelineStorage’ STATIC_ROOT = ‘static’ STATICFILES_FINDERS = ( ‘django.contrib.staticfiles.finders.FileSystemFinder’, ‘django.contrib.staticfiles.finders.AppDirectoriesFinder’, ‘pipeline.finders.PipelineFinder’, )

Continue reading

Angular: How to use shared modules in a Dynamic Component?

Issue I’m creating dynamic component in Angular v6 using compileModuleAndAllComponentsAsync of angular compiler with same below code. viewChangeMethod(view: string) { let template = `<span>${view} </span>`; const tmpCmp = Component({ template: template })(class { }); this._compiler.clearCacheFor(this.tmpModule) this.tmpModule = NgModule({ declarations: [tmpCmp,FRAComponent],import:[ComonModule]

Continue reading

Angular: How to use shared modules in a Dynamic Component?

Issue I’m creating dynamic component in Angular v6 using compileModuleAndAllComponentsAsync of angular compiler with same below code. viewChangeMethod(view: string) { let template = `<span>${view} </span>`; const tmpCmp = Component({ template: template })(class { }); this._compiler.clearCacheFor(this.tmpModule) this.tmpModule = NgModule({ declarations: [tmpCmp,FRAComponent],import:[ComonModule]

Continue reading

Tooltip as dynamic component

Issue I want to add tooltip to the svg element, but as a component created dynamically. I add the tooltip to the element, using TooltipDirective on svg element i.e. <circle tooltip [hostContainerRef]=”chartContainerRef” [hostElement]=””>chartElement [data]=”d.tooltip”></circle> The TooltipDirective dyncamically creates TooltipComponent (in

Continue reading

Dynamically load nested components in angular?

Issue I want to organise my all tabs components dynamic components. I am using primg ng for ui tabs. Currently my code is allTabs.component.html Before <p-tabPanel header=”Contracts”> <app-a [arrId]=’parrangementId’ *ngIf=”tabIndex==1″></app-a> </p-tabPanel> <p-tabPanel header=”Allocations”> <app-b [arrId]=’parrangementId’ *ngIf=”tabIndex==2″></app-b> </p-tabPanel> </p-tabView> Here each

Continue reading

Inputs was not working by dynamic component

Issue I implemented with ndc-dynamic for creating dynamic component. It works very well with outputs, but inputs was not working. I will show my code. <ng-container *ngComponentOutlet=”item.widgetComponent; ndcDynamicInputs: inputs; ndcDynamicOutputs: outputs”> in the ts file aButtonDisabled: boolean; bButtonDisabled: boolean; inputs

Continue reading

Creating dynamic nested components from json response

Issue I’m trying to created nested dynamic components based on json response. public content={type:’paragraph’,depth:1,text:’Root’,entityRanges:[{type:’LINK’,offset:83,length:16,data:{target:’_self’,url:’/index.htm’}}],embbeded:[{type:’text’,text:’This is Text component’}]} So in the above structure, it as type paragraph so the ParagraphComponent need to render first. It as an array object embbeded, in

Continue reading

When is OnInit event triggered for a dynamically loaded angular component?

Issue I am dynamically loading an Angular component (MyComponent) with the following code. I am also passing some data to the component after creating it. let componentFactory = this.componentFactoryResolver.resolveComponentFactory(MyComponent); this.viewContainerRef.clear(); let componentRef = this.viewContainerRef.createComponent(componentFactory); (<MyComponent>componentRef.instance).setData(data); When will the OnInit lifecycle

Continue reading

Outputs on dynamic components without view

Issue On an Angular 8 project i created some dynmic components without a viewref with the following code: const componentFactory = this.componentFactoryResolver.resolveComponentFactory(HelloComponent); const componentRef = componentFactory.create(this.injector); componentRef.changeDetectorRef.detectChanges(); componentRef.instance.slideContentRendered.pipe(first()).subscribe(x => {console.log(‘does not work’, x);}); in the HelloComponent itself i’m waiting for

Continue reading

Dynamic Component Loading – get component as variable

Issue I’m implementing a relatively complex component loader in Angular, and I’d like to dynamically get the component instance from a rxjs store. loadEditAreaComponent(component: any, componentInstanceData?: {}){ const componentFactory = this.cfr.resolveComponentFactory(component); const viewContainerRef = this.editAreaHost.viewContainerRef; const componentRef = viewContainerRef.createComponent(componentFactory); Object.keys(componentInstanceData).forEach(key

Continue reading

How to create multiple instances of a dynamic component sequentially?

Issue I have a SystemMessageService which creates instances of SystemMessageComponent using the following method createSystemMessage(message: string, vcr: ViewContainerRef, time: number = 4500, isErrorMessage: boolean = false, isWarningMessage: boolean = false, isSuccessMessage: boolean = false){ let systemMessageCmpFactory = this.componentFactoryResolver.resolveComponentFactory(SystemMessageComponent); this.hostViewContainerRef =

Continue reading

How to create multiple instances of a dynamic component sequentially?

Issue I have a SystemMessageService which creates instances of SystemMessageComponent using the following method createSystemMessage(message: string, vcr: ViewContainerRef, time: number = 4500, isErrorMessage: boolean = false, isWarningMessage: boolean = false, isSuccessMessage: boolean = false){ let systemMessageCmpFactory = this.componentFactoryResolver.resolveComponentFactory(SystemMessageComponent); this.hostViewContainerRef =

Continue reading

How to create multiple instances of a dynamic component sequentially?

Issue I have a SystemMessageService which creates instances of SystemMessageComponent using the following method createSystemMessage(message: string, vcr: ViewContainerRef, time: number = 4500, isErrorMessage: boolean = false, isWarningMessage: boolean = false, isSuccessMessage: boolean = false){ let systemMessageCmpFactory = this.componentFactoryResolver.resolveComponentFactory(SystemMessageComponent); this.hostViewContainerRef =

Continue reading

How to wait for NgOnInit to complete inside Angular Dynamic Component?

Issue I am trying to set reactive form controls inside dynamic component from parent component. @ViewChild("priceSpecComp", { read: ViewContainerRef}) priceSpecComp: ViewContainerRef LoadDynamicComponent(variant, addons) { priceSpecComp.clear(); var comp = priceSpecComp.createComponent(PricingSpecDynamicComponent) comp.instance.setFormControls(variant, addons); } Inside PricingSpecDynamicComponent NgOnInit there is a http call

Continue reading