SEO – Does rendered HTML from an angular app have to be nicely designed if it is only shown to search engine bots?

I have a square app, and while Google indexes it now, many other sites do not.

I have created middleware that crawls requests from crawlers and provides HTML pages that these crawlers can use to index.

My question is this. Since people do not see these pages, I have to make them pretty with CSS and follow the same theme as my website, or can I simply use basic HTML to get the content I need out there. Will basic HTML ever affect SEO?

The main page in question are jobs that our company publishes on a job page. We want these jobs to be indexed. So can I just have a simple HTML page with all job details?

Typescript – Angular nested formArray with Angular Material chiplist

I have a formGroup with nested formArray. I can iterate on all nested arrays, but I can not see anything from the Mat chip list and I do not know how to get the values ​​of the entries in the math chip list as an array. Here is a stack-flash example. In this example, testingNested3 displays an empty array. I expected an array with the value entered in the input value

Problem signing in to SiginIn Aspnet Core, Identity and Angular

I was able to implement authentication with Identity in aspnet core.
When I use PasswordSignInAsync() I get a success status. The problem is that after logging in I can get the logged in user to use this information for the browser's session.

I've been looking for answers like this and that, trying to check the user in another action (sending another request after logging in), but I always get zero var user = await _userManager.GetUserAsync(HttpContext.User);

I've been in this problem for two days and I'm not getting any progress. Can someone help me get the user information so that I can exhibit on my SPA page in my navigation bar? I also do not know if this is the best way to set up a user session. Better solutions would also be helpful.

I will send my code as follows:

My HTML login form:

    
      

  

My authentication component:

loginForm: FormGroup;
constructor(private fb: FormBuilder, private service: AuthenticationService) { }
ngOnInit() {
this.loginForm = this.fb.group({      
  Username: '',
  Password: '',  
  ReturnUrl:'',  
  RememberMe: true  
});
onLoginSubmit() {
    console.log('sent login', this.loginForm);
    this.service.login(this.loginForm.value).subscribe(
       success => {
      console.log('done');
      },
      error => console.log(error),
      () => console.log('request OK')
    ); 
 }
getUser(){
return this.service.getUser();
}

My authentication service:

constructor(private _httpService: HttpClient) {     }
login(authentication){
    console.log(JSON.stringify(authentication));    
    return this._httpService.post(this.url+'/Login'
      ,JSON.stringify(authentication), { headers: this.headers });
}
getUser(){
    return this._httpService.post(this.url+'/GetUser','', { headers: this.headers });
}

My authentication controller:

public async Task Login((FromBody) LoginViewModel loginViewModel)
    {
        if (!ModelState.IsValid) { 
            return Json(false);
        }
        //Do the SignIn here
        var result = await _sigInManager.PasswordSignInAsync(
            loginViewModel.Username, loginViewModel.Password, loginViewModel.RememberMe, false);            
        if (result.Succeeded)
        {
            if(!string.IsNullOrEmpty(loginViewModel.ReturnUrl) && Url.IsLocalUrl(loginViewModel.ReturnUrl))
            {
                return Json(true);
            }
            else
            {
                return Json(true);
            }
        }
        ModelState.AddModelError("", "Login Failed");
        return Json(false);
    }
    //After PasswordSignInAsync is succeed, I make another request for this method
    //And try to get some information about the user, but none of them
    //Returns any data about the user
    public async Task GetUser()
        {
            var context = HttpContext.User;
            var data = HttpContext.Session;
            var user = await _userManager.GetUserAsync(HttpContext.User);   
            return Json(user.ToString());
        }

The data and context variable declarations are for debugging purposes only.

node.js – npm ERR! cb () never called! when trying to create a new Angular app

I tried to create a new Angular app for my web project at school, but I can not seem to be able to do so because of an unknown bug – cb () never called! I have a log of the console, but I can not find anything useful that I can use to fix the error. That's why I decided that I would post in forums and try to get posts from other users. Already posted in the npmcommunity forum, but I have no answers there yet.

After going through the normal process of creating a new app, I come to the last command "ng new angle-tour-of-heroes". After some time it goes with it

npm ERR! cb () never called!

npm ERR! This is a mistake at npm. Please report this error:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! C: Users lache AppData Roaming npm-cache_logs 2019-09-11T16_05_41_529Z-debug.log
Package installation failed, see above.

The log is 866,000 characters long, so I can not paste it here and I'm not sure how to link it.

I'm running Node 10.16.3 and Npm 6.9.0.

If this is an inappropriate place to post, please tell me where it would be more appropriate.

javascript – How do I sort columns in a data table in Angular?

angular.module('appOPEE')
       .directive('legalPersonTable', ('$rootScope','$window', '$location', '$translate', '$filter', 'appSettings', 'AuthService', '$http', function ($rootScope, $window, $location, $translate, $filter, appSettings, AuthService, $http) {

           function formatString(input) {
               var args = arguments;
               return input.replace(/{(d+)}/g, function (match, capture) {
                   return args(1 * capture + 1);
               });
           };

           return function (scope, element, attrs) {

               var dataTable = element.dataTable({
                   "bDestroy": true,
                   "bFilter": false,
                   "autoWidth": false,
                   "searching": false,
                   "bLengthChange": false,
                   "fnDrawCallback": function () { $('(data-toggle="tooltip")').tooltip(); },
                   "fnRowCallback": function (nRow, aData, iDisplayIndex) {

                       if (aData.IdcAtivo == false || aData.IdcAtivo == null) {
                           $(nRow).addClass('disabledLine');
                           jQuery('td:eq(0)', nRow).html(aData.NomInstituicaoCredenciada + ' (' + $translate.getTranslationTable().LABEL_DISABLED + ')');
                       }

                       var htmlAcoes = '';

                       if (AuthService.userHasPermission('73.3')) {
                           htmlAcoes = '
' + '' + '' + '' + '
'; } if (AuthService.userHasPermission('73.2')) { htmlAcoes += '
' + '' + '' + '' + '
'; } if (AuthService.userHasPermission('73.2')) { htmlAcoes += (aData.IdcAtivo ? '' + '' + '' : '' + '' + ''); } jQuery('td:eq(5)', nRow).html('
' + htmlAcoes + '
'); jQuery('#details', nRow).bind('click', function () { $location.path('LegalPerson/Details/' + aData.IdePessoaJuridica, '_blank'); scope.$apply(); }); jQuery('#edit', nRow).bind('click', function () { $location.path('LegalPerson/Update/' + aData.IdePessoaJuridica); scope.$apply(); }); jQuery('#deactivate', nRow).bind('click', function () { scope.setStatus(aData.IdePessoaJuridica, false); }); jQuery('#activate', nRow).bind('click', function () { scope.setStatus(aData.IdePessoaJuridica, true); }); return nRow; }, "aaSorting": (), "sPaginationType": "full_numbers", "aoColumns": ( { "mDataProp": "NomInstituicaoCredenciada", sDefaultContent: "ND", bSearchable: false, bSortable: true }, { "mDataProp": "CodInstituicaoCredenciada", sDefaultContent: "ND", bSearchable: false, bSortable: true }, { "mDataProp": "DscCnpj", sDefaultContent: "ND", bSearchable: false, bSortable: true }, { "mDataProp": "DscTelefone", sDefaultContent: "ND", bSearchable: false, bSortable: true }, { "mDataProp": "NomUnidadeFederativa", sDefaultContent: "ND", bSearchable: false, bSortable: true }, { "mDataProp": "OPTIONS", sDefaultContent: "ND", bSearchable: false, bSortable: false } ), "oLanguage": { "sProcessing": $rootScope.translationTable.PROCESSING + "...", "sLengthMenu": formatString($rootScope.translationTable.LABEL_SHOW_RECORDS, "_MENU_"), "sZeroRecords": $rootScope.translationTable.MSG_NO_RECORDS_FOUND, "sInfo": formatString($rootScope.translationTable.LABEL_SHOWING_RECORDS, "_START_", "_END_", "_TOTAL_"), "sInfoEmpty": formatString($rootScope.translationTable.LABEL_SHOWING_RECORDS, "0", "0", "0"), "sInfoFiltered": formatString($rootScope.translationTable.LABEL_MAX_FILTERED_RECORDS, "_MAX_"), "sInfoPostFix": "", "sSearch": $rootScope.translationTable.SEARCH + ":", "sUrl": "", "oPaginate": { "sFirst": $rootScope.translationTable.FIRST, "sPrevious": '', "sNext": '', "sLast": $rootScope.translationTable.LAST } } }); scope.$watch(attrs.aaData, function (value) { var val = value || null; if (val != null) { if (val.length == 0) { dataTable.fnClearTable(); } else { dataTable.fnClearTable(); dataTable.fnAddData(scope.$eval(attrs.aaData)); } } }); }; }))

.net – Good resources for learning OAuth authentication between. NET Web Api and Angular

I've been working on heavily coupled apps with ASP WinForms and MVC for years, where user authentication and authorization was checked on the server side using session variables and client-side and server-side actions.

I'm learning Angular myself and trying to understand how an Angular app can authenticate its calls using tokens that the .NET WebApi reads and sends back and forth, and therefore authorizes requests coming from the client.

I've searched lots of google results, but they all seem to complicate things, or they omit certain important parts (i know that access control is not an easy thing, but i can not imagine that this is so complicated in this context) ,

The things I can not and do not want to know are as follows.

  1. How does WebApi use a user and password from the Angle app to create an authentication token?
  2. How does WebApi return this token to the angular app?
  3. And then how the sngular app sends this token to WebApi in subsequent requests
  4. How does the Web API check if this is a valid token? (Know which user it belongs to)

Is there a simple example of a resource (something like just using ADO, not EntityFramework, which omits HTML design and CSS) that focuses on the important parts, and step by step (or at least as granularly as possible) Explains how to perform all of the above steps, or explain in the simplest way how this can be achieved.

I do not seem to understand any of the examples I find on the internet.

thank you in advance

Der Zugriff auf die Sharepoint-Liste mit der REST-API mit Angular führt zu einem Fehler von 403

Ich versuche, mithilfe von REST-APIs eine Sharepoint-Liste aufzurufen. Ich bin bei Sharepoint angemeldet und gebe auf der Registerkarte "Browser" die restliche URL wie folgt ein:

https://myserver.sharepoint.com/sites/mylist/_api/lists/getbytitle('OEC_Docs')/items

Es gibt mir die Daten im Browser wie erwartet zurück. Wenn ich jedoch den unten angegebenen Code in meiner App für eckige 4 verwende, wird der Fehler 403 ausgegeben:

getDocs(){    
  const httpOptions = {
      headers: new HttpHeaders({
          'Accept':  'application/json;odata=verbose',
          'Content-Type': 'application/json'
      })
  };

  return this.http.get(this.sharePointRestHost, httpOptions)
}

Da die App auf localhost im selben Browser läuft. Also erwarte ich, dass es funktioniert.

Bitte geben Sie an, wie das Problem behoben werden kann.

CSS Bootstrap 4 (Angular) button for navigation bar does not work

I use this code sample to implement a collapsible navigation bar with Bootstrap 4 in an Angular project.

Bootstrap was installed with npm together with Popper and jQuery. versions:

angular/core: 8.2.5

angular/cli: 8.3.3

bootstrap: 4.3.1

popper: 1.0.1

popper.js: 1.15.0

jquery: 3.4.1

As shown in the screenshot below, decreasing the window size minimizes the navigation bar and displays the Hamburger button. The hamburger button does not work. No errors are logged in the console.

Enter image description here

Here is my code for navigation:


The answers I came across are because I do not have the correct CDN link (which I do not use). The method I am using may not be correct.

typescript – Parameters for methods with Angular 8 services

I want to use a function to animate an image by clicking the bounce () icon. These icons are reflected in an Angular service, where the path of each icon is located. I've managed to create the animation right now, but it affects all the icons, and I want you to individually animate them.

How can I pass a parameter to the function in the HTML document so that only one of the icons is animated instead of all at the same time?

HTML:

                

{{about.bio}}

TS:

export class AboutComponent implements OnInit {

  // tslint:disable-next-line:variable-name
  constructor( private _AboutService: AboutService,
               private activatedRoute: ActivatedRoute,
               private router: Router) {

                this.activatedRoute.params.subscribe( params => {
                  console.log(params);
                });
}

  currentState = 'normal';
  abouts: About() = ();
  about: any = {};

/* Here i call the AboutService */

ngOnInit() {
  this.abouts = this._AboutService.getAbouts();
  }

/* this function do that the hobbies icons bounce when the mouse will be over. Then, the currentState var will come back to the original state in 1.5 seconds */

bounce() {

    this.currentState = this.currentState === 'normal' ? '*' : 'normal';
    setTimeout(() => {
      this.currentState = 'normal';
    }, 1500);

  }

}