Closed aeldaly closed 6 years ago
You don’t ever seem to import the component DetailsComponent into your model?
The code you are having an issue is confirmed working on the example page
Example Code: https://github.com/AckerApple/angular-file/blob/development/demo/src/app/components/file-upload/simple-demo.html#L20
*module
(I’m on phone)
I import it in another module. Here's what I have:
app.routes.ts
import { Routes } from '@angular/router';
import { AdminLayoutComponent } from './components/common/layouts/admin-layout/admin-layout.component';
import { AuthLayoutComponent } from './components/common/layouts/auth-layout/auth-layout.component';
import { AuthService } from './services/auth/auth.service';
export const rootRouterConfig: Routes = [
{
path: '',
redirectTo: '/sessions/signin',
pathMatch: 'full'
},
{
path: '',
component: AuthLayoutComponent,
children: [
{
path: 'sessions',
loadChildren: './views/sessions/sessions.module#SessionsModule'
}
]
},
{
path: '',
component: AdminLayoutComponent,
canActivate: [AuthService],
children: [
{
path: 'dashboard',
loadChildren: './views/dashboard/dashboard.module#DashboardModule',
data: { title: 'Top 5 Traits' }
}
]
},
{
path: '',
component: AdminLayoutComponent,
children: [
{
path: '',
loadChildren: './views/survey/survey.module#SurveyModule'
}
]
},
{
path: '',
component: AdminLayoutComponent,
children: [
{
path: '',
loadChildren: './views/apply/apply.module#ApplyModule'
}
]
},
// {
// path: '**',
// redirectTo: 'sessions/404'
// }
];
apply.module.ts
:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import {
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatProgressBarModule
} from '@angular/material';
import { CommonDirectivesModule } from '../../directives/common/common-directives.module';
import { applyRoutes } from './apply.routing';
import { SignupComponent } from './signup/signup.component';
import { DetailsComponent } from './details/details.component';
import { SurveyAPI, SurveyApplyAPI } from '../../serverCalls';
import { SurveyService } from '../../services';
@NgModule({
imports: [
CommonModule,
TranslateModule,
ReactiveFormsModule,
FlexLayoutModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatProgressBarModule,
RouterModule.forChild(applyRoutes)
],
declarations: [
SignupComponent,
DetailsComponent
],
providers: [
SurveyApplyAPI,
SurveyAPI,
SurveyService
]
})
export class ApplyModule { }
here's my package.json
{
"name": "clearfit-frontend",
"version": "0.0.1",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.js --hmr",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "1.0.0-beta.2",
"@angular/animations": "5.0.0",
"@angular/cdk": "^5.0.0-rc0",
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/core": "5.0.0",
"@angular/flex-layout": "^2.0.0-beta.10-4905443",
"@angular/forms": "5.0.0",
"@angular/http": "5.0.0",
"@angular/material": "^5.0.0-rc0",
"@angular/platform-browser": "5.0.0",
"@angular/platform-browser-dynamic": "5.0.0",
"@angular/router": "5.0.0",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.0",
"@swimlane/ngx-charts": "6.1.0",
"@swimlane/ngx-datatable": "11.0.0",
"angular-calendar": "0.21.3",
"angular-file": "^0.3.8",
"angular2-logger": "^0.6.0",
"chart.js": "2.5.0",
"classlist.js": "1.1.20150312",
"core-js": "2.4.1",
"d3": "4.10.0",
"date-fns": "1.28.5",
"hammerjs": "2.0.8",
"hopscotch": "0.3.1",
"ng2-charts": "1.6.0",
"ng2-dragula": "1.3.1",
"ng2-validation": "4.2.0",
"ngx-quill": "2.0.4",
"node-sass": "^4.7.1",
"perfect-scrollbar": "0.7.1",
"rxjs": "5.5.2",
"url-parse": "^1.2.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@angular/cli": "1.5.0",
"@angular/compiler-cli": "5.0.0",
"@angularclass/hmr": "^2.1.3",
"@types/hopscotch": "0.2.28",
"@types/jasmine": "2.5.38",
"@types/node": "6.0.60",
"angular-tslint-rules": "^1.0.4",
"codelyzer": "~2.0.0",
"enhanced-resolve": "3.3.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "~0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "~0.2.2",
"protractor": "~5.1.0",
"ts-node": "2.0.0",
"tslint": "4.5.0",
"typescript": "2.4.2"
}
}
Please note that I'm running on Angular 5. Thanks for the link, but as you can see, I've configured it as per the documentation.
Thanks.
It could very well be that this package was built with Angular 4.x.x and that 5 straight up doesn’t work with 4 modules.
When 5 first came out, I was getting the same error as you elsewhere and I abandoned upgrading because no Angular 4 projects were working in 5
We could very well have are selves a major version change. Meaning, I will build the code with 5 but it will be considered a breaking change and I will up the major version number
I’m loaded. This might be a Friday thing. Pull request welcome.
I will report when I have more to
I’m on phone, I will adjust issue labels by removing “invalid” from this issue
It appears we are not the only ones reporting this issue.
Some answers maybe in this issue report on angular/core : https://github.com/angular/angular/issues/19607
v0.4.0 of this package is now built on Angular 5.0.5
Please test and close this issue if satisfactory. Otherwise I will close this issue after inactivity
Am I to understand then that v0.4.0 isn't compatible with Angular v4.x.x projects, and should only be used with v5.x.x?
If that's the case then, is v0.3.8 the last Angular v4 version of the library?
Yes, @alignsoft you are absolutely 100% accurate.
I should note this in the readme but this whole Angular breaking versions crap pisses me off real good and I'm more flustered than focused about it.
This is nothing like how Angular2 kept breaking BUT I seriously we see an end to this incompatible versions
I've confirmed we are all set working on Angular5 . Using in production build. Closing this issue. Reopen if needed
Thanks @AckerApple
Hey you are so very welcome.
Please like, subscribe, star or whatever might cause my packages to receive more acceptance by popular usage.
Here's the error I'm getting:
I've pretty much copied and pasted from the project README.
app.module.ts
:the component:
my html: