Skip to content

Cannot find name 'Router' #10

@nirajmchauhan

Description

@nirajmchauhan

Hi,

I tried using routes, but its throwing me an error. Here is my code:

import {View, Component} from 'angular2/angular2';
import {Router} from 'angular2/router';
import { Home } from './home';

@Component({
    selector:'app'
})

@View({
    templateUrl: '../templates/home.html'
})

export class App{
    constructor(route:Router){
        console.log("app loaded")
    }
}

The compilation throws me following error:

ts/index.ts(14,20): error TS2304: Cannot find name 'Router'.

Is it something I am doing wrong??

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions