import {Component, OnInit} from '@angular/core'; //Import interface import {IProduct} from './product'; //view for the component @Component({ selector:'pm-products', templateUrl:'app/products/product-list.component.html', styleUrls: ['app/products/product-list.component.css'] })
There are several downsides of using absolute path.
- Harder to adjust folder structure.
- Reuse the components
- Some tools within angular require relative path
Solution
We can use the relative path approach by using moduleId
No comments:
Post a Comment