ng-inline-svg | Angular directive for inserting an SVG file inline | Animation library
kandi X-RAY | ng-inline-svg Summary
kandi X-RAY | ng-inline-svg Summary
[Inactive] Angular directive for inserting an SVG file inline within an element.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ng-inline-svg
ng-inline-svg Key Features
ng-inline-svg Examples and Code Snippets
Community Discussions
Trending Discussions on ng-inline-svg
QUESTION
I'am traing to add Angular server side redering using this tutorial: https://angular.io/guide/universal
I'am using i18n translation + material + firebase.
Initially i had to change server.ts file in order to point to right directory (dist/browser/it
) beacuse of error:
ANSWER
Answered 2021-Mar-17 at 12:51Most likely this is related with Firebase. Try to:
- Limit the use of
valueChanges()
usingtake(1)
or some similar operation. For testing purposes, you could replace your entire call to firebase with a mock call that returns an observable or a promise that immediately completes. If it worked, it means your problem is in the call to the database. - Use different versions of
firebase
and@angular/fire
.
valueChanges()
?
Angular Universal runs your code on the server. If your code generates any async operations or observables that never complete, your server will hang forever as it is waiting for the operation to complete.
valueChanges()
is necessary on the client to have a "live" stream and reflect DB changes to the UI in realtime. On the server however, this behavior is the opposite of what you need, as you would probably want to fetch some data and render the page.
Your code should detect whether it's running on a browser or on the server and create the appropriate observable (one that completes after the first emission for server, one that stays open for browsers).
💡 NOTE
valueChanges()
is a common problem in this case, but the same concept applies to any other observable you might have subscribed to in your code.
Why trying different versions?📦 TIP You could use
UniversalService
from the@bespunky/angular-zen
library. Just install the library and inject the service where you need it.
At some point, there was a version of @angular/fire
which had a bug where the library had internally left an operation uncompleted, in turn causing a never completing NgZone
task.
The solution was either upgrading or downgrading, but you had to find the matching firebase
version.
QUESTION
i did use the angular 8 and update that to angular 9 .
but when i run the project it show me this error in console :
RROR Error: Uncaught (in promise): TypeError: Cannot assign to read only property 'tView' of object '[object Object]' TypeError: Cannot assign to read only property 'tView' of object '[object Object]' at getOrCreateTComponentView (core.js:7621) at createRootComponentView (core.js:18895) at
this is my package.json :
...ANSWER
Answered 2020-Feb-29 at 12:19You are using ngrx with ngrx-store-freeze. Most likely you have an action or data model in your store which contains an angular component/template/directive. If you remove storeFreeze
from your metaReducers
, you will most likely not see the error anymore.
Nevertheless, you should find out what reducer is adding this component to the store, and find another way to handle this. It's definitely not a good idea to have such objects in your store anyways
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ng-inline-svg
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page