Showing posts with label Angular. Show all posts
Showing posts with label Angular. Show all posts

Wednesday, April 28, 2021

Custom Attribute ANGULAR ??

https://codecraft.tv/courses/angular/custom-directives/creating-a-custom-directive/

https://www.youtube.com/watch?v=YAlxSudXg_g&list=PL-TLnxxt_AVGz9wRWkCajUkcH5zfa9JKP&index=34&t=9s

https://youtu.be/YAlxSudXg_g  [Make a Custom Angular Directive]


<div class="card card-block" ccCardHover>...</div>


import { Renderer, Directive, ElementRef } from '@angular/core';

import {  } from '@angular/core';

@Directive({

  selector:"[ccCardHover]"

})

class CardHoverDirective {

  constructor(private el: ElementRef, private renderer: Renderer) { 

    //renderer.setElementStyle(el.nativeElement, 'backgroundColor', 'gray'); 

	el.nativeElement.style.backgroundColor = 'gray';

  }

}

Tuesday, April 20, 2021

Angular - Unit TESTING - Karma , Jasmine

Unit tests can be written in a variety of Javascript testing framework (Jasmine, QUnit, Mocha) ; this is JS code that is run in the browser.


Karma is a browser test runner.

Karma can launch the page in many browsers (FF, Chrome, or headless browsers like PhantomJs.)

The custom web page will be a bit different for each testing framework ; this is why karma has plugins for different frameworks.

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass