projekt/ng2-responsive 404 error
See original GitHub issueYour install guide didn’t work in the first place with ng2-Final, typescript 2.0.2 for the Angular Get Started App.
I resolved the issue with adding
'responsive': 'npm:ng2-responsive',
and
'ng2-responsive': { main: './index.js', defaultExtension: 'js' }
to system.config.js.
app.module.ts
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {MdCoreModule} from '@angular2-material/core';
import {MdSidenavModule} from '@angular2-material/sidenav';
import {Ng2BootstrapModule} from "ng2-bootstrap/ng2-bootstrap";
import {AppComponent} from "./app.component";
import {ResponsiveModule} from "ng2-responsive";
@NgModule({
imports: [
BrowserModule,
ResponsiveModule,
Ng2BootstrapModule,
MdCoreModule,
MdSidenavModule
],
declarations: [
AppComponent
],
bootstrap: [
AppComponent
]
})
export class AppModule { }
system.config.js
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
'@angular2-material/core': 'npm:@angular2-material/core/core.umd.js',
'@angular2-material/sidenav': 'npm:@angular2-material/sidenav/sidenav.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'ng2-responsive': 'npm:ng2-responsive',
'moment': 'node_modules/moment/moment.js'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
main: './main.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
},
'angular2-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
},
'ng2-responsive': {
main: './index.js',
defaultExtension: 'js'
}
}
});
})(this);
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Angular 2: 404 error occur when I refresh through the browser
My project has two pages. So I implement Angular 2 routing. I set the default page as login. When I type http://example.com/myapp/ in...
Read more >Error: 'ResponsiveModule' is not exported by node_modules ...
I've tried the solutions mentioned in issue #32 'projekt/ng2-responsive 404 error' but it's not working :-( Could you please tell me what I'm ......
Read more >Angular HTTP Interceptors : Multiple Interceptors and 6 Code ...
If the response from server is in XML format and responsetype is 'json' we get following error SyntaxError: Unexpected token < in JSON...
Read more >How to setup 404 page in angular routing ? - GeeksforGeeks
To set up a 404 page in the angular routing, we have to first create a component to display whenever a 404 error...
Read more >Angular 2 ng2-bootstrap datepicker systemjs 404 error ...
Coding example for the question Angular 2 ng2-bootstrap datepicker systemjs 404 error-angular.js.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@well-made you can try declare every path explicitely in your systemjs.config.js :
Unfortunately I’m having the same problem as @lax20attack and @PickleyD. Have everything set up like @p5hema2 but no luck.