No Exported Member 'router_directives' In Angular2
import { AppModule } from './app/app.module'; import { ROUTER_DIRECTIVES } from '@angular/router'; it gives an error has no exported member 'ROUTER_DIRECTIVES' How to resolve this
Solution 1:
The ROUTER_DIRECTIVES
member is deprecated since Angular 2.0.0 version. For new routing interface visit ROUTING & NAVIGATION.
Solution 2:
ROUTER_DIRECTIVES member is deprecated
<a [routerLinks] ="['']"> home </a> | <a [routerLinks] ="['/user']" > user </a>
Instead of
import { routing } from'./app.routes';
routing is Import @ngModule
@NgModule({
declarations: [ AppComponent],
imports: [BrowserModule, FormsModule , routing],
providers : [],
bootstrap: [AppComponent]
})
app.component.html
<arouterLink="/"routerLinkActive="active"> Home </a> | <arouterLink="/user" > User </a>
Navigation by without reload page
Post a Comment for "No Exported Member 'router_directives' In Angular2"