Then, I did what https://www.npmjs.com/package/ej-angular2 says)ng new my-ej-appcd new my-ej-app
npm install ej-angular2 --save
To generate all *.js, *.js.map and *.d.ts files:$ npm run tscTo lint all *.ts files:$ npm run lint
npm ERR! missing script: tsc
// Import the library moduleimport { EJAngular2Module } from 'ej-angular2';
<button class="btn btn-primary" (click)="openSimpleDialog()"></button>
<ej-dialog id="basicDialog" title="Dialog">This is a simple dialog</ej-dialog>
ERROR in Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /Users/janbranny/Documents/Projects/jb/jb.NG2/my-app/src/app/app.module.ts, resolving symbol AppModule in /Users/janbranny/Documents/Projects/jb/jb.NG2/my-app/src/app/app.module.ts
npm install -g angular-cli@v1.0.0-beta.15
|
npm install ej-angular2@15.1.33 --save
|
our latest Syncfusion Angular 2 components [..] support Angular 2 version 2.4.0
ng new ej-ng2-app
cd ej-ng2-app
npm install ej-angular2@15.1.33 --save
ERROR in Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in C:/projects/angular2/ej-ng2-app/src/app/app.module.ts, resolving symbol AppModule in ./ej-ng2-app/src/app/app.module.ts webpack: Failed to compile.
"[..] edit and resave any component file [..]"My example did not even have a real component file other than the dummy, autogenerated app.component. Try to include your EJAngular2 module in app.module and you'll see, it's impossible. Whether or not you save and refresh any file - it does not help.
ng serve --aot false |
ng serve --aot false |
npm install -g @angular/cli@latest
ng new [PROJECT_NAME]
cd [PROJECT_NAME]
ng serve --aot false |
npm install syncfusion-javascript --save
npm install ej-angular2 --save
npm install --save-dev @types/jquery
npm install --save-dev @types/ej.web.all |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { EJAngular2Module } from 'ej-angular2';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
EJAngular2Module.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { } |
{
"project": {
"name": "clisample"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css",
"./../node_modules/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css"
],
"scripts": [
"./../node_modules/jquery/dist/jquery.min.js",
"./../node_modules/jsrender/jsrender.min.js",
"./../node_modules/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
} |
ng serve --aot false |
ERROR in Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in C:/projects/angular2/sf2/src/app/app.module.ts, resolving symbol AppModule in C :/projects/angular2/sf2/src/app/app.module.ts
WARNING in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/syncfusion-javascript/Content/ej/web/material/ej.theme.min.css autoprefixer: C:\projects\angular2\sf2\node_modules\syncfusion-javascript\Content\ej\web\material\ej.theme.min.css:10:330880: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css 4:10-157@ ./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css@ multi ./src/styles.css ./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css
PS C:\Users\kevin\Downloads\cli-sample2072672477> ng serve --aot false
** NG Live Development Server is running on http://localhost:4200 **
Hash: 2b1e00b5a607546287bd
Time: 18731ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 153 kB {5} [initial] [rendered]
chunk {1} styles.bundle.js, styles.bundle.js.map (styles) 926 kB {5} [initial] [rendered]
chunk {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 11.4 MB {5} [initial] [rendered]
chunk {3} main.bundle.js, main.bundle.js.map (main) 4.2 kB {4} [initial] [rendered]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.93 MB [initial] [rendered]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
WARNING in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/syncfusion-javascript/Content/ej/web/material/ej.theme.min.css
autoprefixer: C:\Users\kevin\Downloads\cli-sample2072672477\node_modules\syncfusion-javascript\Content\ej\web\material\ej.theme.min.css:10:330880: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css 4:10-157
@ ./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css
@ multi ./src/styles.css ./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css
ERROR in Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in C:/Users/kevin/Downloads/cli-sample2072672477/src/app/app.module.ts, resolving symbol AppModule in C:/Users/kevin/Downloads/cli-sample2072672477/src/app/app.module.ts
webpack: Failed to compile.
D:\Samples\Frontend\Syncfusion>ng new ej-ng-app1
installing ng
create .editorconfig
create README.md
create src\app\app.component.css
create src\app\app.component.html
create src\app\app.component.spec.ts
create src\app\app.component.ts
create src\app\app.module.ts
create src\assets\.gitkeep
create src\environments\environment.prod.ts
create src\environments\environment.ts
create src\favicon.ico
create src\index.html
create src\main.ts
create src\polyfills.ts
create src\styles.css
create src\test.ts
create src\tsconfig.app.json
create src\tsconfig.spec.json
create src\typings.d.ts
create .angular-cli.json
create e2e\app.e2e-spec.ts
create e2e\app.po.ts
create e2e\tsconfig.e2e.json
create .gitignore
create karma.conf.js
create package.json
create protractor.conf.js
create tsconfig.json
create tslint.json
Successfully initialized git.
Installing packages for tooling via npm.
Installed packages for tooling via npm.
Project 'ej-ng-app1' successfully created.
D:\Samples\Frontend\Syncfusion>cd ej-ng-app1
D:\Samples\Frontend\Syncfusion\ej-ng-app1>npm install syncfusion-javascript --saveej-ng-app1@0.0.0 D:\Samples\Frontend\Syncfusion\ej-ng-app1
`-- syncfusion-javascript@15.1.37
+-- jquery@3.1.1
+-- jquery-validation@1.16.0
+-- jsrender@0.9.84
| `-- through2@2.0.3
`-- syncfusion-ej-global@15.1.37
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
D:\Samples\Frontend\Syncfusion\ej-ng-app1>npm install ej-angular2 --saveej-ng-app1@0.0.0 D:\Samples\Frontend\Syncfusion\ej-ng-app1
`-- ej-angular2@15.1.37
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
D:\Samples\Frontend\Syncfusion\ej-ng-app1>npm install --save-dev @types/jqueryej-ng-app1@0.0.0 D:\Samples\Frontend\Syncfusion\ej-ng-app1
`-- @types/jquery@2.0.41
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
D:\Samples\Frontend\Syncfusion\ej-ng-app1>npm install --save-dev @types/ej.web.allej-ng-app1@0.0.0 D:\Samples\Frontend\Syncfusion\ej-ng-app1
`-- @types/ej.web.all@15.1.2
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
D:\Samples\Frontend\Syncfusion\ej-ng-app1>code .
D:\Samples\Frontend\Syncfusion\ej-ng-app1>ng serve --aot false** NG Live Development Server is running on http://localhost:4200 **
Hash: 0be052d37f3d5f2f54b9
Time: 18130ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 157 kB {5} [initial] [rendered]
chunk {1} styles.bundle.js, styles.bundle.js.map (styles) 926 kB {5} [initial] [rendered]
chunk {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 11.4 MB {5} [initial] [rendered]
chunk {3} main.bundle.js, main.bundle.js.map (main) 4.2 kB {4} [initial] [rendered]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.93 MB [initial] [rendered]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
WARNING in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/syncfusion-javascript/Content/ej/web/material/ej.theme.min.cssautoprefixer: D:\Samples\Frontend\Syncfusion\ej-ng-app1\node_modules\syncfusion-javascript\Content\ej\web\material\ej.theme.min.css:10:330880: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css 4:10-157
@ ./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css
@ multi ./src/styles.css ./~/syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css
ERROR in Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in D:/Samples/Frontend/Syncfusion/ej-ng-app1/src/app/app.module.ts, resolving symbol AppModule in D:/Samples/Frontend/Syncfusion/ej-ng-app1/src/app/app.module.tswebpack: Failed to compile.
ng serve --aot false
|
start app with: ng serve --aot falseerror comes with the function call .....now change some code, angular-cli triggers a rebuild in webpack
website is server correctlybut now when i want to make a final build (ng build --aot false) it always return error ERROR in Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol... and i can not get pass this because here does not come to rebuild when i chang something....
ng build --prod --aot false –watch
|
Hi all,not sure if this question is still active but I manage to successfully build and serve Angular CLI created project with syncfusion.What I did is that i have created one const object of type ModuleWithProviders in my app.module.ts:import { NgModule, ModuleWithProviders } from '@angular/core';import { EJAngular2Module } from 'ej-angular2';const EjModule: ModuleWithProviders = {ngModule: EJAngular2Module};Then I replaced EJAngular2Module.forRoot() line with my object:@NgModule({declarations: [AppComponent,SupplierDiscountComponent],imports: [BrowserModule,FormsModule,HttpModule,EjModule //EJAngular2Module.forRoot()],providers: [],bootstrap: [AppComponent]})export class AppModule { }And this allowed me to successfully build and serve my project with Angular CLI.This resolves the "Error encountered resolving symbol values statically. Calling function 'EJAngular2Module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /my-ej-app/src/app/app.module.ts, resolving symbol AppModule in /my-ej-app/src/app/app.module.ts".All external scripts for syncfusion, jquery, ... are loaded through angular cli configuration file through styles and scripts configuration.Note: I'm using current Angular version 4.0.0 with Syncfusion and ej-angular2 version 15.1.41.