Presented by Mohammad Doleh & Ryan Wittibschlager
$scope.$digest() or $scope.$apply()$timeoutngAfterContentInitngAfterContentCheckedngAfterViewInitngAfterViewChecked@Component({
templateUrl: 'zippy.html',
styles: [`
.zippy {
background: green;
}
`],
encapsulation: ViewEncapsulation.Native
})
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
| Angular 1.x | Angular 2.0 |
|
|
@Component decoratorbeforeEach(module('myApp'))inject(function(_$controller_, ...)...$controller('PasswordController', { $scope: $scope })$filter('length')$provide.value('myService', myMockedService)var scope = $rootScope.$new();
var element = $compile("<div my-directive></div>")(scope);
scope.$digest();
import {BacService} from '../src/BacService';
beforeEach(() => {
mockSerializer = jasmine.createSpyObj("SerializerService", ["getData", "storeData"]);
bacService = new BacService(mockSerializer);
});