Skip to content

Commit

Permalink
feat(package): update to angular 2 rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
feedyourmind authored and valorkin committed May 18, 2016
1 parent f5157df commit d59368d
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion components/select/off-click.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Directive, HostListener, Input, OnInit, OnDestroy} from 'angular2/core';
import {Directive, HostListener, Input, OnInit, OnDestroy} from '@angular/core';

@Directive({
selector: '[offClick]'
Expand Down
2 changes: 1 addition & 1 deletion components/select/select-pipes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Pipe, PipeTransform} from 'angular2/core';
import {Pipe, PipeTransform} from '@angular/core';
import {escapeRegexp} from './common';

@Pipe({
Expand Down
10 changes: 5 additions & 5 deletions components/select/select.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, Input, Output, EventEmitter, ElementRef, OnInit} from 'angular2/core';
import {Component, Input, Output, EventEmitter, ElementRef, OnInit} from '@angular/core';
import {SelectItem} from './select-item';
import {HighlightPipe, stripTags} from './select-pipes';
import {OptionsBehavior} from './select-interfaces';
Expand All @@ -9,7 +9,7 @@ let optionsTemplate = `
<ul *ngIf="optionsOpened && options && options.length > 0 && !firstItemHasChildren"
class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu">
<li class="ui-select-choices-group">
<div *ngFor="#o of options"
<div *ngFor="let o of options"
class="ui-select-choices-row"
[class.active]="isActive(o)"
(mouseenter)="selectActive(o)"
Expand All @@ -23,11 +23,11 @@ let optionsTemplate = `
<ul *ngIf="optionsOpened && options && options.length > 0 && firstItemHasChildren"
class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu">
<li *ngFor="#c of options; #index=index" class="ui-select-choices-group">
<li *ngFor="let c of options; let index=index" class="ui-select-choices-group">
<div class="divider" *ngIf="index > 0"></div>
<div class="ui-select-choices-group-label dropdown-header">{{c.text}}</div>
<div *ngFor="#o of c.children"
<div *ngFor="let o of c.children"
class="ui-select-choices-row"
[class.active]="isActive(o)"
(mouseenter)="selectActive(o)"
Expand Down Expand Up @@ -86,7 +86,7 @@ let optionsTemplate = `
class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control open">
<div [ngClass]="{'ui-disabled': disabled}"></div>
<span class="ui-select-match">
<span *ngFor="#a of active">
<span *ngFor="let a of active">
<span class="ui-select-match-item btn btn-default btn-secondary btn-xs"
tabindex="-1"
type="button"
Expand Down
4 changes: 2 additions & 2 deletions demo/components/select-section.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES} from 'angular2/common';
import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';

import {TAB_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';

Expand Down
8 changes: 4 additions & 4 deletions demo/components/select/children-demo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';
import {ButtonCheckbox} from 'ng2-bootstrap/ng2-bootstrap';
import {Component} from '@angular/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from '@angular/common';
import {BUTTON_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap';

import {SELECT_DIRECTIVES} from '../../../ng2-select';

Expand All @@ -10,7 +10,7 @@ let template = require('./children-demo.html');
@Component({
selector: 'children-demo',
template: template,
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, ButtonCheckbox]
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, BUTTON_DIRECTIVES ]
})
export class ChildrenDemoComponent {
public items:Array<any> = [
Expand Down
8 changes: 4 additions & 4 deletions demo/components/select/multiple-demo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';
import {ButtonCheckbox} from 'ng2-bootstrap/ng2-bootstrap';
import {Component} from '@angular/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from '@angular/common';
import {BUTTON_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap';

import {SELECT_DIRECTIVES} from '../../../ng2-select';

Expand All @@ -10,7 +10,7 @@ let template = require('./multiple-demo.html');
@Component({
selector: 'multiple-demo',
template: template,
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, ButtonCheckbox]
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, BUTTON_DIRECTIVES ]
})
export class MultipleDemoComponent {
public items:Array<string> = ['Amsterdam', 'Antwerp', 'Athens', 'Barcelona',
Expand Down
8 changes: 4 additions & 4 deletions demo/components/select/rich-demo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, OnInit, ViewEncapsulation} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';
import {ButtonCheckbox} from 'ng2-bootstrap/ng2-bootstrap';
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from '@angular/common';
import {BUTTON_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap';

import {SELECT_DIRECTIVES} from '../../../ng2-select';

Expand Down Expand Up @@ -54,7 +54,7 @@ let template = require('./rich-demo.html');
selector: 'rich-demo',
template: template,
styles: [`colorbox,.colorbox { display:inline-block; height:14px; width:14px;margin-right:4px; border:1px solid #000;}`],
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, ButtonCheckbox],
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, BUTTON_DIRECTIVES ],
encapsulation: ViewEncapsulation.None // Enable dynamic HTML styles
})
export class RichDemoComponent implements OnInit {
Expand Down
8 changes: 4 additions & 4 deletions demo/components/select/single-demo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';
import {ButtonCheckbox} from 'ng2-bootstrap/ng2-bootstrap';
import {Component} from '@angular/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from '@angular/common';
import {BUTTON_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap';

import {SELECT_DIRECTIVES} from '../../../ng2-select';

Expand All @@ -10,7 +10,7 @@ let template = require('./single-demo.html');
@Component({
selector: 'single-demo',
template: template,
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, ButtonCheckbox]
directives: [SELECT_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES, BUTTON_DIRECTIVES ]
})
export class SingleDemoComponent {
public items:Array<string> = ['Amsterdam', 'Antwerp', 'Athens', 'Barcelona',
Expand Down
8 changes: 4 additions & 4 deletions demo/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {bootstrap} from 'angular2/platform/browser';
import {Component} from 'angular2/core';
import {NgClass} from 'angular2/common';
import {bootstrapStatic} from '@angular/platform-browser';
import {Component} from '@angular/core';
import {NgClass} from '@angular/common';

import {SelectSectionComponent} from './components/select-section';

Expand Down Expand Up @@ -41,4 +41,4 @@ let gettingStarted = require('./getting-started.md');
export class DemoComponent {
}

bootstrap(DemoComponent);
bootstrapStatic(DemoComponent);
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@
},
"homepage": "https://github.com/valor-software/ng2-select#readme",
"peerDependencies": {
"angular2": "2.0.0-beta.15"
},
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1",
"@angular/platform-browser-dynamic": "^2.0.0-rc.1"
},
"dependencies": {},
"devDependencies": {
"angular2": "2.0.0-beta.15",
Expand Down

0 comments on commit d59368d

Please sign in to comment.