How to get current route
The new V3 router has a url property. this.router.url === ‘/login’
The new V3 router has a url property. this.router.url === ‘/login’
If I understand you correctly, you want to run the dragula demo. Apparently dragula was not created using an angular cli project. So running the ng serve command from the demo folder will not yield any results. Instead you should run the application using node. First update your angular CLI to make sure it is … Read more
Bootstrap4 alpha for Angular2 CLI (also works for Angular4 CLI) If you are using the angular2 cli/angular 4 cli do following: This will add bootstrap 4 to your project. Next go to your src/style.scss or src/style.css file and import bootstrap there: For style.css For style.scss If you are usinga scss, make sure you change your … Read more
You need to add RouterModule to imports of every @NgModule() where components use any component or directive from (in this case routerLink and <router-outlet>. declarations: [] is to make components, directives, pipes, known inside the current module. exports: [] is to make components, directives, pipes, available to importing modules. What is added to declarations only … Read more
it’s probably because your global @angular/ cli, project @angular/cli version or @angular/compiler-cli doesn’t match. Debugging this first of all run to check the global version of your angular, then compare the version with your angular project versions. if it matches with them or no. If something doesn’t match, update or downgrade it. For example to … Read more
1 My component is defined this way: The sidebar.html template: Seems pretty straight forward, but for some reason, it’s showing all of the sections… what am I missing?
For saving values while refreshing the page, you can use the localStorage or the sessionStorage for that. There is no external library or import necessary. It should work out of the box in most of the browsers. For saving: For loading: You can check this in Chrome using the dev tools.
Try to delete that “angular/cli”: “1.0.0-beta.28.3”, in the devDependencies it is useless , and add instead of it “@angular/compiler-cli”: “^2.3.1”, (since it is the current version, else add it by npm i –save-dev @angular/compiler-cli ), then in your root app folder run those commands: rm -r node_modules (or delete your node_modules folder manually) npm cache clean (npm > v5 add –force so: npm cache clean –force) npm install
Angular 2 and up Bootstrap css (animation is preserved) NO JQuery NO bootstrap.js Supports custom modal content (just like accepted answer) Recently added support for multiple modals on top of each other. ` To show the backdrop, you’ll need something like this CSS: The example now allows for multiple modals at the same time. (see … Read more
To set the disabled property to true or false use