problem description We know that @ angular router provides RouteGuard for access control of routing and navigation, and provides two ways to use guard, such as CanActivate and CanActivateChild, such as . routes = [ { path: advisors :id ...
use angular1.x to pass multiple parameters, and the target page only receives the first ...
Why when the routing address is: user 1 and then connects to routerLink= "user 2 ", although the address bar changes, the page does not change. When interrupting, the address is user 2 ngOnInit () and will not enter. <button (click)="fun()&quo...
problem description now there are three buttons. When I click one, the disabled of the other two will become unavailable. The buttons are the following <button nz-button nzType="primary" [disabled]="!validateForm.valid " (click...
the form data is first brushed to the input value of the foreground through two-way binding in the background, and then the foreground input of the form reset, is displayed as empty, but the background input is still the same. How to make the model valu...
problem description typeList is the data coming from the background, and every result I traverse is type. I want to extract id and ran_name to modal pop-up box display, and then submit to controller. However, the id, will not be temporarily saved and ...
6.x is used in the angular cli project that accidentally installed 7.x. I want to uninstall and reinstall 6.x cli, but use npm uninstall-g @ angular cli to report an error npm ERR! Unexpected end of JSON input while parsing near ....2","de...
this is my code: <tr *ngFor="let items of topics.data | paginate: { itemsPerPage: 5, currentPage: p }"> < tr> <div class="d-flex"> <pagination-controls (pageChange)="p = $event"...
the front-end code is as follows const httpOptions = { headers: new HttpHeaders({ Content-Type : application x-www-form-urlencoded }) } const params = { "type": "phone", "k...
Why did Angular design two compilation methods for JIT AOT? Why do you provide @ angular platform-browser and @ angular platform-browser-dynamic packages? as we know, Angular provides @ angular compiler and @ angular compiler-cli compiler packages. ...
{ "nav": [{ "title": "1", "subs": [ { "txt": "1", "link": " app aaa qualityrank?isp={{$stateParams.isp}}&country={{$stateParams.country}}&p...
Why can the properties modified by private in angular4 still be accessed outside the class? vscode gives an error prompt marked red, but the browser still outputs, with no error ....
how Angular6 is initialized at startup. when using APP_INITIALIZER, each refresh of the page is executed again. My requirement is to run only once when the server starts. ...
recently, when I was studying uploading and downloading files, I didn t quite understand the upload principle of angular-file-upload.js. Is there a great god who can guide the upload principle of angular-file-upload? If it is a picture, it can be under...
I want to dynamically display the next form by changing the value of isDataRequest, but the actual isDataRequest value will change, but the template will not change. The value of each change is stored through subject, and then subscribed in the template...
follow the steps to start using the document and cannot continue if you encounter an error use ng add ng-alain to add modules, and proceed to further study if you encounter errors. Complete output information: Angular CLI: 6.2.1 Node: 8.11.2 OS: wi...
1. Has the ThemesService service been removed from the new version? 2. How to realize the skin-changing function in the new version? The old version was implemented with a build (header-theme, relies on ThemesService). ...
now, after making a login, dynamically pass the menu data and generate the menu according to the logger. So I use rxjs to write a global service, where setMenu () is to set the data into the service after logging in, and getMenu () is in sidebar t...
in styles.scss , variables.scss , variables.scss the variable $jj is defined, and then $jj will report an error variables.scss in testsass.component.scss. $jj : -sharp05c2fc; .jj { background: $jj; } styles.scss @import variables ...
Require loads a very simple Demo of angular-route related codes 1, html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>AngularJS - < title> < head> <body ng-app= routingDemoApp ...