Angular Error 2 Router (Can not find primary outlet to load 'WelcomeComponent')

0

Good morning, I have the following error in my application ANGULAR-2

  
    

EXCEPTION: Uncaught (in promise): Error: Can not find primary outlet to load 'WelcomeComponent'     getOutlet @ link [angular]     ActivateRoutes.prototype.activateRoutes @ link [angular]     ActivateRoutes.prototype.activateChildRoutes / < @ link [angular]     ActivateRoutes.prototype.activateChildRoutes @ link [angular]     ActivateRoutes.prototype.activate @ link [angular]     Router.prototype.runNavigate / http: // localhost: 4200 / vendor.bundle.js: 23648: 17 [angular]     Observable.prototype.forEach / http: // localhost: 4200 / vendor.bundle.js: 5597: 21 [angular]     SafeSubscriber.prototype .__ tryOrSetError @ link [angular]     SafeSubscriber.prototype.next @ link [angular]     Subscriber.prototype. next

asked by anonymous 05.04.2017 / 15:35

1 answer

0

The problem was solved by upgrading the project versions to angular-cli 1.0. the new dependencies in package.json were:

     "dependencies": {
        "@angular/common": "^4.0.0",
        "@angular/compiler": "^4.0.0",
        "@angular/core": "^4.0.0",
        "@angular/forms": "^4.0.0",
        "@angular/http": "^4.0.0",
        "@angular/platform-browser": "^4.0.0",
        "@angular/platform-browser-dynamic": "^4.0.0",
        "@angular/router": "^4.0.0",
        "core-js": "^2.4.1",
        "rxjs": "^5.1.0",
        "zone.js": "^0.8.4"
    },
    "devDependencies": {
        "@angular/cli": "1.0.0",
        "@angular/compiler-cli": "^4.0.0",
        "@types/jasmine": "2.5.38",
        "@types/node": "~6.0.60",
        "codelyzer": "~2.0.0",
        "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-jasmine": "~1.1.0",
        "karma-jasmine-html-reporter": "^0.2.2",
        "karma-coverage-istanbul-reporter": "^0.2.0",
        "protractor": "~5.1.0",
        "ts-node": "~2.0.0",
        "tslint": "~4.5.0",
        "typescript": "~2.2.0"
    }
    
05.04.2017 / 21:27