You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
How is this issue? I don't know if it is related but, when I add a url style I get the next error in the browser:
browser_adapter.js:84EXCEPTION: TypeError: s.replace is not a functionBrowserDomAdapter.logError @ browser_adapter.js:84
browser_adapter.js:84STACKTRACE:BrowserDomAdapter.logError @ browser_adapter.js:84
browser_adapter.js:84TypeError: s.replace is not a function
at Function.StringWrapper.replaceAllMapped (http://localhost:3000/dist/app.bundle.js:34796:19)
at Object.extractStyleUrls (http://localhost:3000/dist/app.bundle.js:40490:49)
at http://localhost:3000/dist/app.bundle.js:48485:58
at Array.map (native)
at DirectiveNormalizer.normalizeStylesheet (http://localhost:3000/dist/app.bundle.js:48484:44)
at DirectiveNormalizer.normalizeLoadedTemplate (http://localhost:3000/dist/app.bundle.js:48424:44)
at DirectiveNormalizer.normalizeTemplateSync (http://localhost:3000/dist/app.bundle.js:48410:22)
at DirectiveNormalizer.normalizeDirective (http://localhost:3000/dist/app.bundle.js:48386:44)
at RuntimeCompiler._getCompiledTemplate (http://localhost:3000/dist/app.bundle.js:47319:189)
at RuntimeCompiler._getTransitiveCompiledTemplates (http://localhost:3000/dist/app.bundle.js:47327:81)BrowserDomAdapter.logError @ browser_adapter.js:84
zone.js:260Uncaught TypeError: s.replace is not a function
This is the code of my component:
import { Component, OnInit} from '@angular/core';
import {ROUTER_DIRECTIVES} from '@angular/router';
import {Menu} from './menu';
import {MenuService} from './menu.service';
@Component({
selector:'my-menu',
templateUrl:'../templates/menu.html',
styleUrls: ['../templates/menu.css'],
directives: [ROUTER_DIRECTIVES]
})
export class MyMenu implements OnInit{
public menuConfig: Menu;
constructor(private menuService:MenuService){}
private _getConfig(){
this.menuService.getConfig().then(data => {
console.log(JSON.stringify(data));
this.menuConfig = data
})
.catch(error => {throw new Error(error)});
}
ngOnInit(){
this._getConfig();
}
}
Removing keepUrl=true from angular2-template-loader?keepUrl=true in generator-jhipster generated code solved this problem for me that started after I refactored my app and moved things around. Maybe something else would have fixed it but the angular2-template-loader instructions say to use this option with file-loader which I'm not doing with template or style files. I'll update this if I find another way.
angular-automatic-lock-bot commented on Sep 4, 2019
Activity
[-]track styleUrls[/-][+]track runtime styleUrls[/+]b091 commentedon Jul 18, 2016
nice to have? So right now angular universal is only for angular using webpack?
ardiadrianadri commentedon Aug 26, 2016
Hello:
How is this issue? I don't know if it is related but, when I add a url style I get the next error in the browser:
This is the code of my component:
And this is the css code of menu.css:
jeffwhelpley commentedon Oct 3, 2016
@gdi2290 what is the status here?
PatrickJS commentedon Oct 4, 2016
we can close this. Developers should use webpack and angular2-template-loader
dancancro commentedon Jul 17, 2017
Removing
keepUrl=truefromangular2-template-loader?keepUrl=truein generator-jhipster generated code solved this problem for me that started after I refactored my app and moved things around. Maybe something else would have fixed it but the angular2-template-loader instructions say to use this option withfile-loaderwhich I'm not doing with template or style files. I'll update this if I find another way.angular-automatic-lock-bot commentedon Sep 4, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.