When executing command:
ng generate route someName
I am getting error like this:
Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. Due to changes in the router, route generation has been temporarily disabled. You can find more information about the new router here: http://victorsavkin.com/post/145672529346/angular-router
Provided links are not helpful
The forRoot() method supplies the service providers and directives needed for routing, and performs the initial navigation based on the current browser URL. Next, AppRoutingModule exports RouterModule to be available throughout the application.
A route definition is a JavaScript object. Each route typically has two properties. The first property, path , is a string that specifies the URL path for the route. The second property, component , is a string that specifies what component your application should display for that path.
At the basic level, routing allows angular to display different "pages" or components. You probably want to have it, if you want to navigate across pages in your application. It shouldn't hurt anything if you add it, but don't use it.
use :
ng g m route --routing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With