mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
3.4 KiB
3.4 KiB
2.0.0-alpha.42 (2015-12-11)
Breaking Changes
CSS Refactor
- Attributes are now used by Ionic to add the correct CSS classes to elements
- Drastically reduced the depth of CSS selectors
- Further modularized Sass files to allow individual imports
- Ionic CSS comes in 3 flavors
ionic.css: Core CSS, iOS CSS, and Material Design CSSionic.ios.css: Core CSS and iOS CSSionic.md.css: Core CSS and Material Design CSS
- App's
index.htmlfile can be setup to dynamically load only the stylesheet it needs - Different Sass color maps for iOS and Material Design
- Allows colors to be different per platform
- ie: Gray navbars in iOS, blue navbars in MD. Identical HTML/JS
- config:
tabbarStyle,navbarStylehas been removed, should now use different Sass color maps instead of setting it in the config - text-input: class
has-valuehas becomeinput-has-value - text-input: class
has-focushas becomeinput-focused - searchbar: class
left-alignhas becomesearchbar-left-aligned - searchbar: class
focusedhas becomesearchbar-focused
<ion-nav-items> renamed to <ion-buttons>
primaryattribute<ion-nav-items primary>now<ion-buttons start>secondaryattribute<ion-nav-items secondary>now<ion-buttons end>
<a menu-toggle> should now be <button menuToggle>
- If a menu is not given an
id, then it is automatically assigned an id, such asleftMenuorrightMenu. - If the menu toggle/close directives are not given a value then it tries the menu ids of
leftMenuthenrightMenu.
<ion-switch> renamed to <ion-toggle>
- Consistent naming with Ionic v1
- Reduce potential confusion with
ng-switch
Bug Fixes
Features
- Upgraded to Angular alpha.50
- Life cycle hooks are now prefixed with
ng- ngOnChanges
- ngOnInit
- ngDoCheck
- ngAfterContentInit
- ngAfterContentChecked
- ngAfterViewInit
- ngAfterViewChecked
- ngOnDestroy
- Life cycle hooks are now prefixed with
Steps to Upgrade to alpha.42
- Update to latest beta CLI:
npm install -g ionic@beta - Convert dash attributes to camelCase (see Angular Changelog)
- Remove sass imports in JS files
- Update css reference in index.html (remove build/css/app.css if it exists)
<link ios-href="build/css/app.ios.css" rel="stylesheet">
<link md-href="build/css/app.md.css" rel="stylesheet">
- Add core stylesheets (copy from a starter or conf app) and remove app.scss:
app.core.scss
app.ios.scss
app.md.scss
app.variables.scss
- Update
app.core.scssto reflect your Sass files - See the conference app for run steps: Getting Started
- Add the new gulp packages and gulp file found in the ionic2-app-base or any of the starter
- Add the contents from the ionic2-app-base ionic.config.js file
- Run
gulp sass watchto watch and compile the sass (will be part of ionic serve in later release)