Giter VIP home page Giter VIP logo

ng2-mock-server's People

Contributors

dominikschlosser avatar sgbeal avatar vladvelici avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ng2-mock-server's Issues

onComplete handler not triggered

i'm not 100% sure this is a bug in this code, but it seems to be. Consider a call chain like:

  let log = console.log.bind(console);
  let error = console.error.bind(console);
  let warn = console.warn.bind(console);
  this.httpService.get(...).subscribe(log, error, warn)

when using this mock, the 3rd (onComplete) callback is not consistently called (only rarely, and i am not certain under which conditions). When not using the mock, it is triggered consistently after the first callback (but apparent;y not if the onError callback is called).

Unmet dependencies when install

I have the following when I try to install ng2-mockup-server :

npm install ng2-mock-server --save-dev
├─┬ [email protected]
│ ├── UNMET PEER DEPENDENCY @angular/[email protected]
│ ├── UNMET PEER DEPENDENCY @angular/[email protected]
│ └── UNMET PEER DEPENDENCY @angular/[email protected]
└── UNMET PEER DEPENDENCY [email protected]

Btw, here are my project's dependencies :

"dependencies": {
    "@angular/common": "^2.4.0",
    "@angular/compiler": "^2.4.0",
    "@angular/core": "^2.4.0",
    "@angular/forms": "^2.4.0",
    "@angular/http": "^2.4.0",
    "@angular/platform-browser": "^2.4.0",
    "@angular/platform-browser-dynamic": "^2.4.0",
    "@angular/router": "^3.4.0",
    "@ngx-translate/core": "^6.0.0",
    "@ngx-translate/http-loader": "0.0.3",
    "bootstrap": "^4.0.0-alpha.6",
    "core-js": "^2.4.1",
    "ng2-mock-server": "0.0.3",
    "rxjs": "^5.1.0",
    "zone.js": "^0.7.6"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0-beta.32.3",
    "@angular/compiler-cli": "^2.4.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0-beta.4",
    "css-loader": "^0.26.2",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ng2-mock-server": "0.0.3",
    "protractor": "~5.1.0",
    "style-loader": "^0.13.2",
    "ts-node": "~2.0.0",
    "tslint": "~4.4.2",
    "typescript": "~2.0.0"
  }

Do you have any idea about these errors ?
Maybe ng2-mockup-server dependencies need to be upgraded.

Adjustments for angular2 rc.1

Hi!

we were unable to get ng2-mock-server running as a node module (and unable to figure out why, because none of us know much of anything about node), but we have since integrated it directly, as-is into our source tree and it's working great. We have replaced json-server with your mock because it's far simpler for our development workflow (no need for a second server process).

i'm trying to upgrade us from angular2 beta-12 (14?) to rc.1 and had to make the following changes to your code (unfortunately i have no diff, but the changes were minimal):

  • all of the modules were renamed: 'angular2/xxx' ==> '@angular/xxx'. A couple require more notable changes, but i don't recall what they are off-hand :/.

  • the http module has to be loaded separately in package.json:

    "@angular/http": "2.0.0-rc.1",

  • most notably, i had to change this import from mocksrv.service.ts:

    import {Connection, ConnectionBackend} from '@angular/http/src/interfaces';

(http/src/interfaces uses to be in the main a2 module)

After that, broccoli compiles it :). i still haven't gotten our tree to the point where i can actually try that out, but it at least compiles.

Thanks for the code!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.