Comments (10)
I think we just need to change that line for models/index
, we are already exporting every model within the models/index.ts but I had a similar issue when using the angular-cli, that does not happen in nativescript, though.... so Ill check tomorrow morning!!!
Thanks for reporting @ottojimb
from loopback-sdk-builder.
@ottojimb I just published beta8 with the modified line, I tested and worked.. 🎯
Thanks for your patience!!!
Cheers,
Jon
from loopback-sdk-builder.
There should not be a models.service. Models are just typed interfaces not services.
from loopback-sdk-builder.
Agree with @JonnyBGod these are different
from loopback-sdk-builder.
I'm re-opening just to verify there is actually no reference for the model.service -it should not-
from loopback-sdk-builder.
@ottojimb is probably looking for some way to validate models at runtime. (connect me if I am wrong)
I believe this is out of scope for the project. But we can consider some kind of plugin system for these extensions.
from loopback-sdk-builder.
I'm still confused lol ... because at runtime there are no types, just plain javascript... @ottojimb can you clarify how you got to create this issue? thanks!!!
from loopback-sdk-builder.
@JonnyBGod @jonathan-casarrubias I'm generating it with the "npm run build:sdk" and my generated index.ts is as follows:
/* tslint:disable */
import { HTTP_PROVIDERS } from '@angular/http';
import { LoopBackAuth } from './services/auth.service';
import { ErrorHandler } from './services/errorHandler.service';
import { LoggerService } from './services/logger.service';
import { JSONSearchParams } from './services/search.params';
import {
UserApi,
AccessTokenApi,
...
ReferenceApi,
ValueApi,
HolaApi
} from './services/api.service'
export const API_PROVIDERS: any[] = [
HTTP_PROVIDERS,
LoopBackAuth,
ErrorHandler,
LoggerService,
JSONSearchParams,
UserApi,
AccessTokenApi,
...
ReferenceApi,
ValueApi,
HolaApi
];
export * from './models'; //this line generates the issue
export * from './services/api.service';
export * from './services/config.service';
export * from './services/auth.service';
export * from './services/logger.config';
export * from './services/logger.service';
On google chrome dev tools I get:
GET http://localhost:5555/app/shared/sdk/models.js 404 (Not Found)
Error: Error: XHR error (404 Not Found) loading http://localhost:5555/app/shared/sdk/models.js(…) "Report this error at https://github.com/mgechev/angular2-seed/issues"
Then I replace the line with a new reference with the following content:
/* tslint:disable */
export * from '../models/User';
export * from '../models/AccessToken';
export * from '../models/ACL';
export * from '../models/RoleMapping';
export * from '../models/Role';
export * from '../models/ArticleType';
export * from '../models/Property';
export * from '../models/Option';
export * from '../models/OptionProperty';
export * from '../models/Country';
export * from '../models/State';
export * from '../models/City';
export * from '../models/Contact';
export * from '../models/Article';
export * from '../models/Image';
export * from '../models/Container';
export * from '../models/Group';
export * from '../models/Brand';
export * from '../models/Reference';
export * from '../models/Value';
export * from '../models/Hola';
Sorry by can't help, I'm newbie with git, the PR and typescript.
from loopback-sdk-builder.
@jonathan-casarrubias
Sorry, my VSCode hid the index file. Clearly it is the best solution.
Thank you!
from loopback-sdk-builder.
@ottojimb yes there is something that I ignore the reason... But when using angular cli, vcode ignores the index.ts. but only when you have like nested modules with index.ts I believe is a bug from them, we should be able to always call just the module and if there is an index it should take that.. but bleh!! anyhow I'm fixing it in our side right now, I just test it and land it in beta8.
Cheers!!
Jon
from loopback-sdk-builder.
Related Issues (20)
- Fireloop mentioned in docs, but doesn't resolve
- Doc bug; Architecture Diagram missing
- Only PATCH methods HOT 2
- REACT MAINTAINERS are welcome
- SDK compatibility with Angular 5.2 HOT 1
- VueJS
- Question: How to reset password sample HOT 8
- StaticInjectionError HOT 2
- AccountApi Not Found in Sdk
- API on SSL. What about client?
- Problem with LoopBackConfig.setApiVersion('')
- Set parameter customHeader in all server calls
- Loopback 3 mounted on Loopback 4 HOT 1
- User model is not generated HOT 1
- Proper use of Container Model SDK HOT 2
- Wrong api service generation
- updateAttributes makes null all attributes which are not defined
- Unicode character can't set in headers!
- Doesn't work on Angular 10 HOT 10
- Question: '.' is not recognized as an internal or external command HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-sdk-builder.